cmake_minimum_required(VERSION 3.14) project(cursebreakerParser) # Set C++ standard set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) # Collect all source files file(GLOB_RECURSE SOURCES "src/*.cpp") # Include FetchContent include(FetchContent) message(STATUS "Using rapidyaml") message(STATUS "Using GLM") message(STATUS "Using TinyXML2") message(STATUS "Using SQLiteCpp") message(STATUS "Using rapidjson") FetchContent_Declare( rapidyaml GIT_REPOSITORY https://github.com/biojppm/rapidyaml.git GIT_TAG master ) FetchContent_Declare( glm GIT_REPOSITORY https://github.com/g-truc/glm.git GIT_TAG master ) FetchContent_Declare( tinyxml2 GIT_REPOSITORY https://github.com/leethomason/tinyxml2.git GIT_TAG master ) FetchContent_Declare( sqlitecpp GIT_REPOSITORY https://github.com/SRombauts/SQLiteCpp.git GIT_TAG master ) FetchContent_Declare( rapidjson GIT_REPOSITORY https://github.com/Tencent/rapidjson GIT_TAG master ) FetchContent_Declare( nlohmann_json GIT_REPOSITORY https://github.com/nlohmann/json.git GIT_TAG master ) # Enable exceptions in rapidyaml set(RYML_DEFAULT_CALLBACK_USES_EXCEPTIONS ON CACHE BOOL "" FORCE) set(RYML_DBG OFF CACHE BOOL "" FORCE) FetchContent_MakeAvailable(rapidyaml glm tinyxml2 sqlitecpp rapidjson nlohmann_json) # Create the main executable add_executable(${PROJECT_NAME} ${SOURCES}) # Link libraries to our executable target_link_libraries(${PROJECT_NAME} PUBLIC ryml::ryml) target_link_libraries(${PROJECT_NAME} PUBLIC tinyxml2::tinyxml2) target_link_libraries(${PROJECT_NAME} PUBLIC SQLiteCpp) target_link_libraries(${PROJECT_NAME} PUBLIC nlohmann_json::nlohmann_json) # Add include directories for rapidyaml target_include_directories(${PROJECT_NAME} PRIVATE ${rapidyaml_SOURCE_DIR}/src) # Add include directories for GLM target_include_directories(${PROJECT_NAME} PRIVATE ${glm_SOURCE_DIR}) # Add include directories for rapidjson target_include_directories(${PROJECT_NAME} PRIVATE ${rapidjson_SOURCE_DIR}/include) # Include directories target_include_directories(${PROJECT_NAME} PRIVATE include)