Files
build-script/CMakeLists.txt
Lyra 124560ac29
All checks were successful
Build / Build (linux) (push) Successful in 35s
Build / Build (windows) (push) Successful in 37s
Bug fixes + rework check dir
2026-06-29 08:18:23 -04:00

42 lines
1.3 KiB
CMake

cmake_minimum_required(VERSION 3.28)
project(build_script)
set(CMAKE_CXX_STANDARD 26)
set(CMAKE_POLICY_VERSION_MINIMUM 3.5)
# Taskflow has a deprecated declaration issue in its small_vector.hpp file
add_compile_options(-Wno-deprecated-declarations)
file(GLOB REQUIRED_CMAKE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/cmake/*.required.cmake")
foreach (cmake_file ${REQUIRED_CMAKE_FILES})
include(${cmake_file})
endforeach ()
file(GLOB CMAKE_FILES "${CMAKE_CURRENT_SOURCE_DIR}/cmake/*.cmake")
foreach (cmake_file ${CMAKE_FILES})
include(${cmake_file})
endforeach ()
include_directories(src/)
file(GLOB_RECURSE SRC_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp")
file(GLOB_RECURSE HEADER_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/*.h")
add_executable(${PROJECT_NAME} ${SRC_FILES} ${HEADER_FILES})
target_include_directories(${PROJECT_NAME} PUBLIC
"${structops_SOURCE_DIR}/include"
"${spdlog_SOURCE_DIR}/include"
"${taskflow_SOURCE_DIR}"
)
target_link_libraries(${PROJECT_NAME} PUBLIC
structopt
spdlog
Taskflow
)
# Structopt includes an outdated version of magic_enum that breaks some default defines
# This is needed to bypass it. Im not happy about it, but it is what it is
target_link_options(build_script PRIVATE -Wl,--allow-multiple-definition)