-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
62 lines (51 loc) · 1.28 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
# mqtt2telegram
cmake_minimum_required (VERSION 3.13)
PROJECT(mqtt2telegram)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_COMPILER_ARCHITECTURE_ID "x64")
# https://cmake.org/cmake/help/v3.6/module/FindBoost.html
set(Boost_ARCHITECTURE "-x64")
#set(Boost_USE_STATIC_LIBS ON)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
#set(Boost_DEBUG 1)
#set(Boost_REALPATH ON)
#set(BOOST_ROOT "/usr/local")
#set(Boost_DETAILED_FAILURE_MSG ON)
set(BOOST_INCLUDEDIR "/usr/local/include/boost")
#set(BOOST_LIBRARYDIR "/usr/local/lib")
#find_package(Boost 1.81.0 REQUIRED COMPONENTS program_options thread filesystem log)
find_package(Boost 1.81.0 COMPONENTS program_options regex thread filesystem log log_setup json REQUIRED )
set(
file_hpp
Config.hpp
Loop.hpp
)
set(
file_cpp
Config.cpp
Loop.cpp
main.cpp
)
add_executable(
${PROJECT_NAME}
${file_h}
${file_cpp}
)
target_compile_definitions(${PROJECT_NAME} PUBLIC BOOST_LOG_DYN_LINK )
#target_compile_definitions(${PROJECT_NAME} PUBLIC pthread )
#add_definitions(-pthread)
target_link_directories(
${PROJECT_NAME} PUBLIC
/usr/local/lib
)
target_link_libraries(
${PROJECT_NAME}
pthread
libou_mqtt.a
libou_telegram.a
libpaho-mqtt3c.a
${Boost_LIBRARIES}
crypto
ssl
)