-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
executable file
·29 lines (22 loc) · 943 Bytes
/
CMakeLists.txt
File metadata and controls
executable file
·29 lines (22 loc) · 943 Bytes
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
project(dashbutton)
cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
# add single headers to project structure
FILE(GLOB_RECURSE HeaderFiles "*.hpp")
add_custom_target(headers SOURCES ${HeaderFiles})
include_directories(.)
# use standalone version of ASIO (CentOS7 on arm64 has only a old one)
include_directories(asio/asio/include)
add_definitions(-DASIO_STANDALONE=1)
find_package(Boost 1.53.0 COMPONENTS system program_options REQUIRED)
find_package(Threads)
if(Boost_FOUND)
aux_source_directory(. SRC_LIST)
add_executable(${PROJECT_NAME} ${SRC_LIST})
target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} mosquittopp)
else()
message(FATAL_ERROR "boost library not found.")
endif()