forked from dresden-elektronik/deconz-rest-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
49 lines (37 loc) · 1.27 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
cmake_minimum_required(VERSION 3.14)
project(rest_api LANGUAGES CXX)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(DECONZ_INCLUDE_DIR /usr/local/include)
find_package(QT NAMES Qt5 COMPONENTS Core Gui SerialPort Widgets Qml REQUIRED)
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui SerialPort Widgets Qml REQUIRED)
add_compile_definitions(
DECONZ_DLLSPEC=
)
if(QT_VERSION VERSION_LESS "5.15.0")
add_compile_definitions( SKIP_EMPTY_PARTS=QString::SkipEmptyParts )
else()
add_compile_definitions( SKIP_EMPTY_PARTS=Qt::SkipEmptyParts )
endif()
add_library(deconz_common INTERFACE)
target_include_directories(deconz_common INTERFACE ${DECONZ_INCLUDE_DIR})
target_link_directories(deconz_common INTERFACE /usr/local/lib)
target_link_libraries(deconz_common
INTERFACE Qt${QT_VERSION_MAJOR}::Core
INTERFACE Qt${QT_VERSION_MAJOR}::Gui
INTERFACE Qt${QT_VERSION_MAJOR}::Widgets
INTERFACE Qt${QT_VERSION_MAJOR}::Qml
deCONZ.so
)
add_subdirectory (resource)
add_subdirectory (device_js)
add_subdirectory (device)
add_subdirectory (utils)
add_subdirectory (zcl)
add_subdirectory (zdp)
enable_testing()
add_subdirectory (tests)