Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion xcodetocmake.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def create_cmake_lists(project_path, source_files):
# Open a new CMakeLists.txt file in write mode
with open('CMakeLists.txt', 'w') as cmake_file:
# Write the minimum required CMake version
cmake_file.write(f"cmake_minimum_required(VERSION 3.10)\n")
cmake_file.write("cmake_minimum_required(VERSION 3.10)\n")
# Write the project name
cmake_file.write(f"project({project_name})\n\n")
# Start the add_executable command
Expand Down
6 changes: 3 additions & 3 deletions xcodetocmake_deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def create_cmake_lists(project_path, files, dependencies, include_headers=True,

try:
with open('CMakeLists.txt', 'w') as cmake_file:
cmake_file.write(f"cmake_minimum_required(VERSION 3.10)\n")
cmake_file.write("cmake_minimum_required(VERSION 3.10)\n")
cmake_file.write(f"project({project_name})\n\n")

# /* Add source files to the executable target */
Expand Down Expand Up @@ -76,8 +76,8 @@ def create_cmake_lists(project_path, files, dependencies, include_headers=True,
# /* Conditionally handle resources */
if include_resources and files['resources']:
cmake_file.write("\n# Resources\n")
cmake_file.write(f"set(RESOURCE_DIR ${{CMAKE_BINARY_DIR}}/Resources)\n")
cmake_file.write(f"file(MAKE_DIRECTORY ${{RESOURCE_DIR}})\n")
cmake_file.write("set(RESOURCE_DIR ${CMAKE_BINARY_DIR}/Resources)\n")
cmake_file.write("file(MAKE_DIRECTORY ${RESOURCE_DIR})\n")
for resource in files['resources']:
cmake_file.write(f"file(COPY {resource} DESTINATION ${{RESOURCE_DIR}})\n")

Expand Down