-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathCMakeLists.txt
68 lines (52 loc) · 1.91 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
cmake_minimum_required (VERSION 3.9)
project (ebu_list_all)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/config/cmake" "${CMAKE_CURRENT_SOURCE_DIR}/third_party/bimo/config/cmake")
include(options)
include(conan)
include(cpp-requirements)
include(ebu-list-cpp-requirements)
include(list-version)
configure_file(
"${PROJECT_SOURCE_DIR}/scripts/version.yml.in"
"${PROJECT_SOURCE_DIR}/apps/listwebserver/version.yml"
)
execute_process(COMMAND bash "${PROJECT_SOURCE_DIR}/scripts/reset_libssl_permissions.sh"
WORKING_DIRECTORY "${PROJECT_SOURCE_DIR}")
# -------------------------------------------------------------------------
# conan
conan_check()
# Remove repositories used in older versions
conan_remove_remote(NAME conan-center)
conan_remove_remote(NAME bincrafters)
conan_remove_remote(NAME bisect)
# Add conan center
conan_add_remote(NAME conancenter URL https://center.conan.io)
conan_cmake_run(CONANFILE conanfile.txt
BASIC_SETUP CMAKE_TARGETS
# Build mongo stuff from source, otherwise it may fail due to being built against a different glibc
BUILD missing cpprestsdk mongo-c-driver mongo-cxx-driver spdlog)
# -------------------------------------------------------------------------
if(${CMAKE_GENERATOR} MATCHES "Visual Studio.*")
include(${CMAKE_BINARY_DIR}/conanbuildinfo_multi.cmake)
else()
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
endif()
list_set_cpp_properties()
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
add_subdirectory(third_party)
if(BUILD_TESTS)
enable_testing()
endif()
message(STATUS "====== LIBS ======")
add_subdirectory(cpp/libs)
message(STATUS "==================")
if(BUILD_APPS)
message(STATUS "====== APPS ======")
add_subdirectory(cpp/apps)
message(STATUS "==================")
endif()
if(BUILD_DEMOS)
message(STATUS "===== DEMOS ======")
add_subdirectory(cpp/demos)
message(STATUS "==================")
endif()