-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
54 lines (37 loc) · 1.56 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
cmake_minimum_required (VERSION 3.16)
set(VERSION_REGEX "inline constexpr std::string_view version =[ \t]+\"(.+)\".")
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/include/WebFront.hpp" VERSION_STRING REGEX ${VERSION_REGEX})
string(REGEX REPLACE ${VERSION_REGEX} "\\1" VERSION_STRING "${VERSION_STRING}")
project(WebFront LANGUAGES CXX VERSION ${VERSION_STRING})
add_library(WebFront INTERFACE)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake)
include(StandardProjectSettings)
include(PreventInSourceBuilds)
add_library(WebFront_options INTERFACE)
target_compile_features(WebFront_options INTERFACE cxx_std_23)
add_library(WebFront_warnings INTERFACE)
include(Cache)
include(Linker)
configure_linker(WebFront_options)
include(CompilerWarnings)
set_project_warnings(WebFront_warnings)
include(Sanitizers)
enable_sanitizers(WebFront_options)
configure_file(Doxyfile.in ${CMAKE_BINARY_DIR}/Doxyfile)
include(Doxygen)
enable_doxygen()
include(StaticAnalyzers)
include(CPM)
CPMAddPackage("gh:ambroise-leclerc/networking-ts-impl@1.12.0a")
target_link_libraries(WebFront INTERFACE WebFront_options WebFront_warnings)
target_include_directories(WebFront INTERFACE ${CMAKE_SOURCE_DIR}/include SYSTEM ${networking-ts-impl_SOURCE_DIR}/include)
option(BUILD_SHARED_LIBS "Enable compilation of shared libraries" OFF)
option(ENABLE_TESTING "Enable Test Builds" ON)
option(ENABLE_FUZZING "Enable Fuzzing Builds" OFF)
add_compile_definitions(_WIN32_WINNT=0x0501)
if(ENABLE_TESTING)
enable_testing()
add_subdirectory(test)
add_subdirectory(webtest)
endif()
add_subdirectory(src)