-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
42 lines (35 loc) · 1.51 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
cmake_minimum_required(VERSION 3.9)
project(hue_server VERSION 1.0.0
DESCRIPTION "HUE lighting system controller"
LANGUAGES CXX)
add_compile_options(-Wall -Wextra -W -Wshadow -Wformat -fexceptions)
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include_directories(include)
include_directories(src)
file(GLOB SOURCES "src/*.cpp")
#list(REMOVE_ITEM SOURCES src/hue_server_interface.cpp)
link_directories(/usr/local/lib)
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_MULTITHREADED ON)
set(Boost_USE_STATIC_RUNTIME OFF)
find_package(Boost REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
find_package(CURL)
include_directories(${CURL_INCLUDE_DIRS})
find_package(Notcurses REQUIRED)
include_directories(${Notcurses_INCLUDE_DIRS})
# find_package(Notcurses++ REQUIRED)
# set_package_properties(Notcurses PROPERTIES TYPE REQUIRED)
# include_directories(${Notcurses_LIBRARARY_DIRS})
# include_directories(${NotcursesCore_INCLUDE_DIRS})
# include_directories(${Notcurses++_INCLUDE_DIRS})
add_library(${CMAKE_PROJECT_NAME}_lib src/hue_server_interface.cpp)
add_executable(${CMAKE_PROJECT_NAME} ${SOURCES})
target_link_libraries(${CMAKE_PROJECT_NAME} ${Boost_LIBRARIES})
target_link_libraries(${CMAKE_PROJECT_NAME} ${CURL_LIBRARIES})
target_link_libraries(${CMAKE_PROJECT_NAME} ${Notcurses_LIBRARIES})
# target_link_libraries(${CMAKE_PROJECT_NAME} ${Notcurses++_LIBRARIES})
# target_link_libraries(${CMAKE_PROJECT_NAME} ${NotcursesCore_LIBRARIES})