-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
74 lines (58 loc) · 1.3 KB
/
CMakeLists.txt
File metadata and controls
74 lines (58 loc) · 1.3 KB
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
66
67
68
69
70
71
72
73
74
cmake_minimum_required(VERSION 3.16)
project("ic4-ctrl")
find_package( ic4 REQUIRED )
if (NOT DISABLE_FETCHCONTENT_PACKAGES)
include(FetchContent)
FetchContent_Declare(
CLI11
GIT_REPOSITORY https://github.com/CLIUtils/CLI11.git
GIT_TAG v2.5.0
)
FetchContent_MakeAvailable(CLI11)
FetchContent_Declare(
fmt
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
GIT_TAG 11.0.2
)
FetchContent_MakeAvailable(fmt)
FetchContent_Declare(
nlohmann-json
GIT_REPOSITORY https://github.com/nlohmann/json.git
GIT_TAG v3.12.0
)
FetchContent_MakeAvailable(nlohmann-json)
else()
find_package( CLI11 REQUIRED )
find_package( fmt REQUIRED )
find_package( nlohmann_json REQUIRED )
endif()
add_executable( ic4-ctrl
"src/ic4-ctrl.cpp"
"src/ic4_enum_to_string.h"
"src/ic4-ctrl-helper.h"
"src/print_property.h"
"src/print_property.cpp"
"src/helper_json.h"
"src/helper_json.cpp"
"src/print_ic4_object.h"
"src/print_ic4_object.cpp"
"src/stream_test.h"
"src/stream_test.cpp"
"src/stream_test_camera.h"
"src/stream_test_camera.cpp"
)
target_link_libraries( ic4-ctrl
PRIVATE
ic4::core
CLI11::CLI11
fmt::fmt
nlohmann_json::nlohmann_json
)
if (WIN32)
target_link_libraries( ic4-ctrl
PRIVATE
ic4::gui
)
endif()
set_property(TARGET ic4-ctrl PROPERTY CXX_STANDARD 17)
ic4_copy_runtime_to_target(ic4-ctrl)