-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
41 lines (30 loc) · 1020 Bytes
/
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
set(PROJECT_NAME partooth)
cmake_minimum_required( VERSION 3.0.2 )
set(CMAKE_CXX_FLAGS "-std=c++14 ${CMAKE_CXX_FLAGS}")
project(${PROJECT_NAME})
find_package(Qt5Widgets REQUIRED)
find_package(Qt5DBus REQUIRED)
find_package(Qt5Bluetooth REQUIRED)
if(NOT CMAKE_BUILD_TYPE)
set( CMAKE_BUILD_TYPE Debug )
endif (NOT CMAKE_BUILD_TYPE)
set(CMAKE_AUTOMOC ON)
#set(CMAKE_AUTOUIC ON)
file(GLOB SRCS *.cpp)
file(GLOB UIS *.ui)
qt5_wrap_ui(UIHS ${UIS})
include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_BINARY_DIR}
)
add_executable(${PROJECT_NAME}
${SRCS}
${UIHS}
)
target_link_libraries(${PROJECT_NAME}
Qt5::Widgets
Qt5::DBus
Qt5::Bluetooth)
install(TARGETS ${PROJECT_NAME} DESTINATION bin CONFIGURATIONS Release Debug)
install(FILES partooth.desktop DESTINATION share/applications CONFIGURATIONS Release Debug)
install(FILES partooth.svg DESTINATION share/icons/hicolor/scalable/apps CONFIGURATIONS Release Debug)