diff options
author | Tiger Wang <ziwei.tiger@outlook.com> | 2020-05-28 00:48:49 +0200 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@outlook.com> | 2020-07-12 23:00:07 +0200 |
commit | 2c0fc395ba95bcaa3b877b88ebd2d1ee0affff9a (patch) | |
tree | 8e3922013a79e1bb83797a55ec83eac19bf0d2ce /CMakeLists.txt | |
parent | More CMake cleanup (diff) | |
download | cuberite-2c0fc395ba95bcaa3b877b88ebd2d1ee0affff9a.tar cuberite-2c0fc395ba95bcaa3b877b88ebd2d1ee0affff9a.tar.gz cuberite-2c0fc395ba95bcaa3b877b88ebd2d1ee0affff9a.tar.bz2 cuberite-2c0fc395ba95bcaa3b877b88ebd2d1ee0affff9a.tar.lz cuberite-2c0fc395ba95bcaa3b877b88ebd2d1ee0affff9a.tar.xz cuberite-2c0fc395ba95bcaa3b877b88ebd2d1ee0affff9a.tar.zst cuberite-2c0fc395ba95bcaa3b877b88ebd2d1ee0affff9a.zip |
Diffstat (limited to '')
-rw-r--r-- | CMakeLists.txt | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f31f33f13..9931176fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,19 @@ option(PRECOMPILE_HEADERS "Enable precompiled headers for faster builds" ON) option(SELF_TEST "Enables testing code to be built" OFF) option(UNITY_BUILDS "Enables source aggregation for faster builds" ON) -# We need C++17 features +include("CMake/AddDependencies.cmake") +include("CMake/Fixups.cmake") +include("CMake/GenerateBindings.cmake") +include("CMake/GroupSources.cmake") +include("SetFlags.cmake") + +# Add build timestamp and details: +include("CMake/StampBuild.cmake") + +# TODO: set_build_stamp() +set_global_flags() + +# We need C++17 features: set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) @@ -40,15 +52,15 @@ if(WHOLE_PROGRAM_OPTIMISATION) set(CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ${IPO_SUPPORTED}) endif() -# Static CRT +# Static CRT: set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") -# Add build timestamp and details: -include("CMake/StampBuild.cmake") - add_executable(${CMAKE_PROJECT_NAME}) add_subdirectory(src) +enable_warnings(${CMAKE_PROJECT_NAME}) +build_dependencies(${CMAKE_PROJECT_NAME}) + # Set the startup project to Cuberite, and the debugger dir: set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT ${CMAKE_PROJECT_NAME}) set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/Server") @@ -93,8 +105,6 @@ if(${SELF_TEST}) add_subdirectory(tests) endif() -include("CMake/AddDependencies.cmake") -include("CMake/Fixups.cmake") -include("CMake/GenerateBindings.cmake") -include("CMake/GroupSources.cmake") -include("SetFlags.cmake") +emit_fixups() +group_sources() +enable_bindings_generation() |