diff options
| author | Nicolas James <Eele1Ephe7uZahRie@tutanota.com> | 2025-02-12 21:57:46 +1100 |
|---|---|---|
| committer | Nicolas James <Eele1Ephe7uZahRie@tutanota.com> | 2025-02-12 21:57:46 +1100 |
| commit | e4483eca01b48b943cd0461e24a74ae1a3139ed4 (patch) | |
| tree | ed58c3c246e3af1af337697695d780aa31f6ad9a /src/client/CMakeLists.txt | |
| parent | 1cc08c51eb4b0f95c30c0a98ad1fc5ad3459b2df (diff) | |
Update to most recent version (old initial commit)
Diffstat (limited to 'src/client/CMakeLists.txt')
| -rw-r--r-- | src/client/CMakeLists.txt | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/src/client/CMakeLists.txt b/src/client/CMakeLists.txt new file mode 100644 index 0000000..e6994ab --- /dev/null +++ b/src/client/CMakeLists.txt @@ -0,0 +1,60 @@ +cmake_minimum_required(VERSION 3.18) + +project(blockgame_linux) + +file (GLOB_RECURSE SOURCE_FILES CONFIGURE_DEPENDS + "*.cc" +) +file (GLOB_RECURSE HEADER_FILES CONFIGURE_DEPENDS + "*.hh" + "../server/*.hh" + "../shared/*.hh" +) +add_executable(${PROJECT_NAME} + ${SOURCE_FILES} +) + +find_library(LIB_SDL2 sdl2 SDL2 REQUIRED) +find_library(LIB_EPOXY epoxy epoxy EPOXY libepoxy REQUIRED) +find_library(LIB_SQLITE3 sqlite3 SQLITE3 REQUIRED) +find_library(LIB_FREETYPE freetype libfreetype REQUIRED) +find_library(LIB_ASSIMP assimp libassimp REQUIRED) +find_library(LIB_PROTOBUF protobuf libprotobuf REQUIRED) +find_package(Boost COMPONENTS iostreams REQUIRED) +find_package(Threads REQUIRED) +find_package(Backtrace REQUIRED) +find_package(Freetype REQUIRED) + +target_compile_options(${PROJECT_NAME} PRIVATE + -Wall -Wextra -Wshadow -Wdouble-promotion -Wformat=2 -Wundef -fno-common + -Wconversion -Wpedantic -std=c++20 -O2 + -Wno-exceptions + -Wno-missing-field-initializers -Wno-unknown-pragmas +) +target_compile_options(${PROJECT_NAME} PRIVATE + -fstack-protector-strong -fno-omit-frame-pointer #-fsanitize=undefined -fsanitize-trap=undefined +) +target_link_options(${PROJECT_NAME} PRIVATE + -fstack-protector-strong #-fsanitize=undefined -fsanitize-trap=undefined +) +target_include_directories(${PROJECT_NAME} PRIVATE + "../../src" + ${FREETYPE_INCLUDE_DIRS} +) +target_link_libraries(${PROJECT_NAME} PRIVATE + ${LIB_SDL2} + ${LIB_EPOXY} + ${LIB_FREETYPE} + ${LIB_ASSIMP} + ${LIB_PROTOBUF} + ${LIB_SQLITE3} + ${Backtrace_LIBRARIES} + ${Threads_LIBRARIES} + ${Boost_LIBRARIES} + ${FREETYPE_LIBRARIES} + shared + server +) +target_precompile_headers(${PROJECT_NAME} PRIVATE + ${HEADER_FILES} +) |
