diff options
| author | untodesu <kirill@untode.su> | 2025-12-11 15:14:26 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-12-11 15:14:26 +0500 |
| commit | f40d09cb8f712e87691af4912f3630d92d692779 (patch) | |
| tree | 7ac3a4168ff722689372fd489c6f94d0a2546e8f /src/core/CMakeLists.txt | |
| parent | 8bcbd2729388edc63c82d77d314b583af1447c49 (diff) | |
| download | voxelius-f40d09cb8f712e87691af4912f3630d92d692779.tar.bz2 voxelius-f40d09cb8f712e87691af4912f3630d92d692779.zip | |
Shuffle stuff around
- Use the new and improved hierarchy I figured out when making Prospero chat
- Re-add NSIS scripts, again from Prospero
- Update most build and utility scripts with their most recent versions
Diffstat (limited to 'src/core/CMakeLists.txt')
| -rw-r--r-- | src/core/CMakeLists.txt | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt new file mode 100644 index 0000000..7a3edfc --- /dev/null +++ b/src/core/CMakeLists.txt @@ -0,0 +1,28 @@ +execute_process(COMMAND git rev-parse --short=8 HEAD + WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}" + OUTPUT_VARIABLE GIT_COMMIT_HASH + OUTPUT_STRIP_TRAILING_WHITESPACE) +configure_file("${CMAKE_CURRENT_LIST_DIR}/version.cc.in" "${CMAKE_CURRENT_LIST_DIR}/version.cc") + +add_library(core STATIC + "${CMAKE_CURRENT_LIST_DIR}/pch.hh" + "${CMAKE_CURRENT_LIST_DIR}/threading.cc" + "${CMAKE_CURRENT_LIST_DIR}/threading.hh" + "${CMAKE_CURRENT_LIST_DIR}/version.cc" + "${CMAKE_CURRENT_LIST_DIR}/version.hh") +target_compile_features(core PUBLIC cxx_std_20) +target_include_directories(core PUBLIC "${PROJECT_SOURCE_DIR}/src") +target_precompile_headers(core PRIVATE "${CMAKE_CURRENT_LIST_DIR}/pch.hh") +target_link_libraries(core PUBLIC enet emhash glm physfs spdlog stb thread_pool) + +add_subdirectory(config) +add_subdirectory(io) +add_subdirectory(math) +add_subdirectory(resource) +add_subdirectory(utils) + +if(WIN32) + target_compile_definitions(core PUBLIC _CRT_SECURE_NO_WARNINGS) + target_compile_definitions(core PUBLIC _USE_MATH_DEFINES) + target_compile_definitions(core PUBLIC NOMINMAX) +endif() |
