-
Notifications
You must be signed in to change notification settings - Fork 7
/
cmake.toml
65 lines (57 loc) · 1.76 KB
/
cmake.toml
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
63
64
65
# Reference: https://build-cpp.github.io/cmkr/cmake-toml
[project]
name = "kananlib"
cmake-before="""
add_compile_options($<$<CXX_COMPILER_ID:MSVC>:/MP>)
"""
cmake-after="""
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
# The project is being built standalone
message(STATUS "kananlib: Building standalone")
set(KANANLIB_STANDALONE_BUILD ON)
else()
# The project is being included as part of another project
message(STATUS "kananlib: Building as part of another project")
set(KANANLIB_STANDALONE_BUILD OFF)
endif()
"""
[options]
KANANLIB_FETCH_BDDISASM = false
KANANLIB_FETCH_SPDLOG = false
KANANLIB_STANDALONE_BUILD = false
[conditions]
fetch-bddisasm = "KANANLIB_FETCH_BDDISASM OR KANANLIB_STANDALONE_BUILD"
fetch-spdlog = "KANANLIB_FETCH_SPDLOG OR KANANLIB_STANDALONE_BUILD"
[fetch-content.bddisasm]
condition = "fetch-bddisasm"
git = "https://github.com/bitdefender/bddisasm"
tag = "v1.37.0"
shallow = true
[fetch-content.spdlog]
condition = "fetch-spdlog"
git = "https://github.com/gabime/spdlog"
tag = "v1.12.0"
shallow = true
[template.kananlib-template]
type = "static"
sources = ["src/*.cpp", "include/**.hpp"]
include-directories = ["include"]
compile-features = ["cxx_std_20"]
compile-options = ["/EHa"]
link-libraries = [
"bddisasm::bddisasm",
"spdlog::spdlog",
"shlwapi"
]
[target.kananlib]
type = "kananlib-template"
[target.kananlib-nolog]
type = "kananlib-template"
compile-definitions = ["SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_OFF"]
# TODO: define a target for each of your executables/libraries like this:
#[target.myexecutable]
#type = "executable" # static, shared
#sources = ["src/kananlib/*.cpp", "include/kananlib/*.hpp"]
#include-directories = ["include"]
#compile-features = ["cxx_std_11"]
#link-libraries = ["target-or-library"]