initial commit
This commit is contained in:
56
CMakeLists.txt
Normal file
56
CMakeLists.txt
Normal file
@@ -0,0 +1,56 @@
|
||||
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")
|
||||
|
||||
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
|
||||
)
|
||||
|
||||
# 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)
|
||||
|
||||
# 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)
|
||||
|
||||
# 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})
|
||||
|
||||
# Include directories
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE include)
|
||||
Reference in New Issue
Block a user