Skip to content

Commit 90b6535

Browse files
committed
cleanup the build command
1 parent 0fc088b commit 90b6535

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

BUILDING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
mkdir build
1818
cd build
1919
cmake . . -DCMAKE_BUILD_TYPE=Release
20-
cmake --build . --config Release --target all
20+
cmake --build . --config Release --target all -j
2121

2222
```
2323

CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ if (NOT APPLE)
1313
set(SFML_STATIC_LIBRARIES TRUE)
1414
endif()
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
1723
configure_file(
1824
${CMAKE_CURRENT_SOURCE_DIR}/src/proto_schema/AppVersion.hpp.in

cmake/macbundle.cmake

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,14 @@ set_source_files_properties(${application_icon}
66

77
# images
88
file(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()
1417
endforeach()
1518

1619
add_executable(${CMAKE_PROJECT_NAME} MACOSX_BUNDLE

0 commit comments

Comments
 (0)