From b16785441e663efbf9800066d0cca2d857318ec3 Mon Sep 17 00:00:00 2001 From: jadebenn Date: Sat, 23 Nov 2024 14:54:43 -0800 Subject: [PATCH] download to common source directory --- .gitignore | 3 +++ CMakeLists.txt | 12 +++++++++--- thirdparty/CMakeLists.txt | 3 --- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index 0b0d2ecf..f5d13237 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,9 @@ docker/configs # Third party libraries thirdparty/mysql/ thirdparty/mysql_linux/ +thirdparty/backtrace/ +thirdparty/magic_enum/ +thirdparty/tinyxml2/ CMakeVariables.txt # Build folders diff --git a/CMakeLists.txt b/CMakeLists.txt index 377daff6..4e9f4d2f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -110,26 +110,34 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) find_package(MariaDB) # Fetch third party dependencies +set(DLU_THIRDPARTY_SOURCE_DIR ${CMAKE_SOURCE_DIR}/thirdparty) + include(FetchContent) FetchContent_Declare( backtrace SYSTEM + SOURCE_DIR ${DLU_THIRDPARTY_SOURCE_DIR}/backtrace GIT_REPOSITORY https://github.com/ianlancetaylor/libbacktrace.git ) FetchContent_Declare( magic_enum SYSTEM + SOURCE_DIR ${DLU_THIRDPARTY_SOURCE_DIR}/magic_enum GIT_REPOSITORY https://github.com/Neargye/magic_enum.git GIT_TAG v0.9.7 ) FetchContent_Declare( tinyxml2 SYSTEM + SOURCE_DIR ${DLU_THIRDPARTY_SOURCE_DIR}/tinyxml2 GIT_REPOSITORY https://github.com/leethomason/tinyxml2.git GIT_TAG 9.0.0 ) FetchContent_MakeAvailable(magic_enum tinyxml2) +# Turn off tinyxml2 testing +set(tinyxml2_BUILD_TESTING OFF) + include(CMakePrintHelpers) cmake_print_properties(TARGETS magic_enum tinyxml2 PROPERTIES INTERFACE_INCLUDE_DIRECTORIES) @@ -276,9 +284,7 @@ include_directories( "tests/dGameTests/dComponentsTests" SYSTEM - # "thirdparty/magic_enum/include/magic_enum" "thirdparty/raknet/Source" - # "thirdparty/tinyxml2" "thirdparty/recastnavigation" "thirdparty/SQLite" "thirdparty/cpplinq" @@ -297,7 +303,7 @@ if(MSVC) # add_compile_options("/W4") # Want to enable warnings eventually, but WAY too much noise right now elseif(CMAKE_CXX_COMPILER_ID MATCHES "Clang|GNU") - add_compile_options("-Wuninitialized" "-Wold-style-cast") + add_compile_options("-Wuninitialized" "-Wold-style-cast" "-Wstrict-aliasing") else() message(WARNING "Unknown compiler: '${CMAKE_CXX_COMPILER_ID}' - No warning flags enabled.") endif() diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index b370ccff..26c6ec9e 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -1,9 +1,6 @@ # Source Code for recast add_subdirectory(recastnavigation) -# Turn off tinyxml2 testing -set(tinyxml2_BUILD_TESTING OFF) - # Source Code for libbcrypt. Uses a file glob instead to get around Windows build issues. file( GLOB SOURCES_LIBBCRYPT