build: seperate the cmakelists file
This commit is contained in:
parent
64b682c4ea
commit
faa4a5b256
|
@ -6,6 +6,8 @@ set(CMAKE_CXX_STANDARD 26)
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
|
||||||
set(CMAKE_COLOR_DIAGNOSTICS 1)
|
set(CMAKE_COLOR_DIAGNOSTICS 1)
|
||||||
|
|
||||||
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||||
|
|
||||||
find_program(MOLD_LINKER mold)
|
find_program(MOLD_LINKER mold)
|
||||||
if(MOLD_LINKER)
|
if(MOLD_LINKER)
|
||||||
add_link_options(-fuse-ld=mold)
|
add_link_options(-fuse-ld=mold)
|
||||||
|
@ -19,38 +21,9 @@ endif()
|
||||||
|
|
||||||
include(FetchContent)
|
include(FetchContent)
|
||||||
|
|
||||||
find_package(ctre QUIET)
|
include(FindCTRE)
|
||||||
if(NOT ctre_FOUND)
|
include(FindCPR)
|
||||||
FetchContent_Declare(
|
include(FindGlaze)
|
||||||
ctre
|
|
||||||
GIT_REPOSITORY https://github.com/hanickadot/compile-time-regular-expressions.git
|
|
||||||
GIT_TAG v3.9.0
|
|
||||||
GIT_SHALLOW TRUE
|
|
||||||
)
|
|
||||||
FetchContent_MakeAvailable(ctre)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
find_package(cpr QUIET)
|
|
||||||
if(NOT cpr_FOUND)
|
|
||||||
FetchContent_Declare(
|
|
||||||
cpr
|
|
||||||
GIT_REPOSITORY https://github.com/libcpr/cpr.git
|
|
||||||
GIT_TAG 1.11.0
|
|
||||||
GIT_SHALLOW TRUE
|
|
||||||
)
|
|
||||||
FetchContent_MakeAvailable(cpr)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
find_package(glaze QUIET)
|
|
||||||
if(NOT glaze_FOUND)
|
|
||||||
FetchContent_Declare(
|
|
||||||
glaze
|
|
||||||
GIT_REPOSITORY https://github.com/stephenberry/glaze.git
|
|
||||||
GIT_TAG v4.0.1
|
|
||||||
GIT_SHALLOW TRUE
|
|
||||||
)
|
|
||||||
FetchContent_MakeAvailable(glaze)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
file(GLOB_RECURSE SOURCES
|
file(GLOB_RECURSE SOURCES
|
||||||
${CMAKE_SOURCE_DIR}/src/*.cpp
|
${CMAKE_SOURCE_DIR}/src/*.cpp
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
find_package(cpr QUIET)
|
||||||
|
if(NOT cpr_FOUND)
|
||||||
|
include(FetchContent)
|
||||||
|
FetchContent_Declare(
|
||||||
|
cpr
|
||||||
|
GIT_REPOSITORY https://github.com/libcpr/cpr.git
|
||||||
|
GIT_TAG 1.11.0
|
||||||
|
GIT_SHALLOW TRUE
|
||||||
|
)
|
||||||
|
FetchContent_MakeAvailable(cpr)
|
||||||
|
endif()
|
|
@ -0,0 +1,11 @@
|
||||||
|
find_package(ctre QUIET)
|
||||||
|
if(NOT ctre_FOUND)
|
||||||
|
include(FetchContent)
|
||||||
|
FetchContent_Declare(
|
||||||
|
ctre
|
||||||
|
GIT_REPOSITORY https://github.com/hanickadot/compile-time-regular-expressions.git
|
||||||
|
GIT_TAG v3.9.0
|
||||||
|
GIT_SHALLOW TRUE
|
||||||
|
)
|
||||||
|
FetchContent_MakeAvailable(ctre)
|
||||||
|
endif()
|
|
@ -0,0 +1,11 @@
|
||||||
|
find_package(glaze QUIET)
|
||||||
|
if(NOT glaze_FOUND)
|
||||||
|
include(FetchContent)
|
||||||
|
FetchContent_Declare(
|
||||||
|
glaze
|
||||||
|
GIT_REPOSITORY https://github.com/stephenberry/glaze.git
|
||||||
|
GIT_TAG v4.0.1
|
||||||
|
GIT_SHALLOW TRUE
|
||||||
|
)
|
||||||
|
FetchContent_MakeAvailable(glaze)
|
||||||
|
endif()
|
Loading…
Reference in New Issue