-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dependencies.cmake
57 lines (47 loc) · 1.48 KB
/
Dependencies.cmake
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
include(CMakeFindDependencyMacro)
macro(find_package_dependency)
# When loading the *Config.cmake we should
# call find_dependency which is just a wrapper
# around find_package to display better
# messages to the user. When directly dealing
# with our CMakeLists.txt, we should call
# find_package directly
if(FROM_CONFIG_FILE)
find_dependency(${ARGN})
else()
find_package(${ARGN})
endif()
endmacro()
# ===========================
# == OPTIONAL DEPENDENCIES ==
# ===========================
if(BOFSTD_BUILD_TESTS)
#### find_package(GTest REQUIRED)
endif()
# ===========================
# == REQUIRED DEPENDENCIES ==
# ===========================
if(NOT TARGET jsoncpp_object)
find_package_dependency(jsoncpp REQUIRED)
if(TARGET jsoncpp_lib)
add_library(jsoncpp::jsoncpp ALIAS jsoncpp_lib)
elseif(TARGET jsoncpp_static)
add_library(jsoncpp::jsoncpp ALIAS jsoncpp_static)
else()
message(FATAL_ERROR "Unknown target for jsoncpp")
endif()
endif()
#just above find_package_dependency(jsoncpp REQUIRED)
####find_package_dependency(spdlog REQUIRED)
#find_package_dependency(fmt REQUIRED)
find_package_dependency(date REQUIRED)
#if you want to use readerwriterqueue or concurrentqueue add the following to vcpkg.json
# {"name": "readerwriterqueue"},
# {"name": "concurrentqueue"}
#and activate
# include/bofstd/bofspscqueue.h
# include/bofstd/bofmpmcqueue.h
#in lib CMakeLists.txt
# src/ut_spscqueue.cpp
# src/ut_mpmcqueue.cpp
#in tests CMakeLists.txt