File tree Expand file tree Collapse file tree 4 files changed +23
-0
lines changed
Expand file tree Collapse file tree 4 files changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -52,3 +52,12 @@ endif()
5252# windows app
5353set_property (TARGET ${PROJECT_NAME} PROPERTY VS_DPI_AWARE "PerMonitor" )
5454set_property (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT "${PROJECT_NAME} " )
55+
56+ # Strip binary for release builds
57+ if (CMAKE_BUILD_TYPE STREQUAL Release)
58+ if (LINUX OR MSVC )
59+ add_custom_command (TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_STRIP} ${CMAKE_BUILD_TYPE} /${PROJECT_NAME} )
60+ elseif (APPLE )
61+ add_custom_command (TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_STRIP} ${CMAKE_BUILD_TYPE} /${PROJECT_NAME} .app/Contents/MacOS/${PROJECT_NAME} )
62+ endif ()
63+ endif ()
Original file line number Diff line number Diff line change 1+ mkdir -p build && mkdir -p build/linux && cd build/linux
2+ cmake -G " Ninja" -DCMAKE_BUILD_TYPE=Release ../..
3+ cmake --build . --config release --target install
Original file line number Diff line number Diff line change 1+ mkdir -p build && cd build
2+ cmake -G " Xcode" -DCMAKE_BUILD_TYPE=Release ..
3+ cmake --build . --config Release --target install
Original file line number Diff line number Diff line change 1+ @ echo off
2+
3+ mkdir build
4+ cd build
5+ mkdir win
6+ cd win
7+ cmake -DCMAKE_BUILD_TYPE=Release ..\..
8+ cmake --build . --config release --target install
You can’t perform that action at this time.
0 commit comments