File tree Expand file tree Collapse file tree 3 files changed +15
-6
lines changed
Expand file tree Collapse file tree 3 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 1717mkdir build
1818cd build
1919cmake . . -DCMAKE_BUILD_TYPE=Release
20- cmake --build . --config Release --target all
20+ cmake --build . --config Release --target all -j
2121
2222```
2323
Original file line number Diff line number Diff line change @@ -13,6 +13,12 @@ if (NOT APPLE)
1313 set (SFML_STATIC_LIBRARIES TRUE )
1414endif ()
1515
16+ # defualt to building in "RELEASE" mode
17+ if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES )
18+ set (CMAKE_BUILD_TYPE "Release" CACHE STRING
19+ "Choose the type of build." FORCE)
20+ endif ()
21+
1622# write app version into Header
1723configure_file (
1824 ${CMAKE_CURRENT_SOURCE_DIR} /src/proto_schema/AppVersion.hpp.in
Original file line number Diff line number Diff line change @@ -6,11 +6,14 @@ set_source_files_properties(${application_icon}
66
77# images
88file (GLOB_RECURSE my_images "${CMAKE_SOURCE_DIR} /resources/*" )
9- foreach (FILE ${my_images} )
10- file (RELATIVE_PATH NEW_FILE "${CMAKE_SOURCE_DIR} /" ${FILE} )
11- get_filename_component (NEW_FILE_PATH ${NEW_FILE} DIRECTORY )
12- set_source_files_properties (${FILE} PROPERTIES MACOSX_PACKAGE_LOCATION
13- "Resources/${NEW_FILE_PATH} " )
9+ foreach (FILE ${my_images} )
10+ get_filename_component (FILENAME ${FILE} DIRECTORY )
11+ # SKIP .DS_Store files
12+ if (NOT FILENAME STREQUAL ".DS_Store" )
13+ file (RELATIVE_PATH NEW_FILE "${CMAKE_SOURCE_DIR} /" ${FILE} )
14+ get_filename_component (NEW_FILE_PATH ${NEW_FILE} DIRECTORY )
15+ set_source_files_properties (${FILE} PROPERTIES MACOSX_PACKAGE_LOCATION "Resources/${NEW_FILE_PATH} " )
16+ endif ()
1417endforeach ()
1518
1619add_executable (${CMAKE_PROJECT_NAME} MACOSX_BUNDLE
You can’t perform that action at this time.
0 commit comments