File tree Expand file tree Collapse file tree 3 files changed +2
-30
lines changed Expand file tree Collapse file tree 3 files changed +2
-30
lines changed Original file line number Diff line number Diff line change @@ -7,24 +7,8 @@ project(
77 LANGUAGES CXX
88)
99
10- set (CMAKE_CXX_STANDARD 20)
11-
12- if (WIN32 ) # Install dlls in the same directory as the executable on Windows
13- set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR} )
14- set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR} )
15- set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR} )
16- set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR} )
17- set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR} )
18- set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR} )
19- endif ()
20-
21- if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" )
22- set (CMAKE_CXX_FLAGS_DEBUG "/MDd" )
23- set (CMAKE_CXX_FLAGS_RELEASE "/O2" )
24- else ()
25- set (CMAKE_CXX_FLAGS_DEBUG "-g" )
26- set (CMAKE_CXX_FLAGS_RELEASE "-O3" )
27- endif ()
10+ include (cmake/SetCompilerOptions.cmake)
11+ include (cmake/IncludeExternalLibraries.cmake)
2812
2913add_subdirectory (lib)
3014add_subdirectory (bin)
Original file line number Diff line number Diff line change 11add_executable (${PROJECT_NAME} main.cpp)
22
3- if (NOT CMAKE_BUILD_TYPE )
4- set (CMAKE_BUILD_TYPE Release) # Main executable should be built with Release
5- endif ()
6-
7- message (STATUS "Main executable build type: ${CMAKE_BUILD_TYPE} " )
8-
93target_link_libraries (${PROJECT_NAME} PUBLIC
104 ui
115)
Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION 3.12)
22
3- if (NOT CMAKE_BUILD_TYPE )
4- set (CMAKE_BUILD_TYPE Debug) # Change this to Release when you're ready to release
5- endif ()
6-
7- message (STATUS "Libraries build type: ${CMAKE_BUILD_TYPE} " )
8-
93add_subdirectory (mylib)
104add_subdirectory (ui)
You can’t perform that action at this time.
0 commit comments