blob: 496b2cd03d7659c50b87b36fca448f423399276a (
plain)
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
55
56
57
58
59
60
61
62
|
cmake_minimum_required(VERSION 3.20)
project(ahsi VERSION 0.1.0 LANGUAGES CXX C)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
include(FetchContent)
FetchContent_Declare(
tomlplusplus
GIT_REPOSITORY https://github.com/marzer/tomlplusplus.git
GIT_TAG v3.4.0
)
FetchContent_MakeAvailable(tomlplusplus)
FetchContent_Declare(
json
GIT_REPOSITORY https://github.com/nlohmann/json.git
GIT_TAG v3.11.3
)
FetchContent_MakeAvailable(json)
FetchContent_Declare(
inja
GIT_REPOSITORY https://github.com/pantor/inja.git
GIT_TAG v3.4.0
)
set(INJA_USE_EMBEDDED_JSON OFF CACHE BOOL "" FORCE)
set(INJA_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(BUILD_TESTING OFF CACHE BOOL "" FORCE)
set(BUILD_BENCHMARK OFF CACHE BOOL "" FORCE)
set(INJA_INSTALL OFF CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(inja)
FetchContent_Declare(
cmark
GIT_REPOSITORY https://github.com/commonmark/cmark.git
GIT_TAG 0.31.1
)
FetchContent_MakeAvailable(cmark)
file(GLOB AHSI_SOURCES CONFIGURE_DEPENDS src/*.cpp)
add_executable(ahsi ${AHSI_SOURCES})
target_include_directories(ahsi PRIVATE
src
${tomlplusplus_SOURCE_DIR}/include
${json_SOURCE_DIR}/include
${inja_SOURCE_DIR}/include
)
target_link_libraries(ahsi PRIVATE cmark)
set_target_properties(ahsi PROPERTIES
VERSION ${PROJECT_VERSION}
OUTPUT_NAME "ahsi"
)
|