forked from felixonmars/panda-topbar
-
Notifications
You must be signed in to change notification settings - Fork 14
/
CMakeLists.txt
64 lines (48 loc) · 1.78 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
62
63
64
cmake_minimum_required(VERSION 3.0)
project(Menu)
# Disable deprecation warnings
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations")
set(CMAKE_INSTALL_PREFIX "/System/Menu.app")
# https://github.com/helloSystem/Menu/issues/118
# Needed for libstatusnotifier.so
if(BSD)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Xlinker --export-dynamic")
else()
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-export-dynamic")
endif()
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
# include(GNUInstallDirs)
# Do not put qDebug() into Release builds
if(NOT CMAKE_BUILD_TYPE STREQUAL Debug)
add_definitions(-DQT_NO_DEBUG_OUTPUT)
endif()
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
find_package(PkgConfig REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5Concurrent REQUIRED)
find_package(Qt5X11Extras REQUIRED)
find_package(Qt5DBus REQUIRED)
find_package(Qt5LinguistTools REQUIRED)
find_package(KF5DBusAddons REQUIRED)
find_package(KF5WindowSystem REQUIRED)
find_package(KF5Baloo REQUIRED)
find_package(XCB REQUIRED COMPONENTS xcb xcb-util xcb-damage)
find_package(X11 REQUIRED)
find_package(PulseAudio)
pkg_check_modules(XCOMPOSITE REQUIRED xcomposite)
pkg_check_modules(XDAMAGE REQUIRED xdamage)
pkg_check_modules(XRENDER REQUIRED xrender)
pkg_check_modules(XCB_EWMH REQUIRED xcb-ewmh x11)
file(GLOB INTERFACES "interfaces/*.h")
add_subdirectory(src)
add_subdirectory(plugin-datetime)
add_subdirectory(plugin-statusnotifier)
add_subdirectory(plugin-volume)
add_subdirectory(plugin-windows)
# add_subdirectory(plugin-battery)
add_subdirectory(Shutdown)
install(FILES ${INTERFACES} DESTINATION ${CMAKE_INSTALL_PREFIX}/Resources/include/menubar)
install(FILES Menu.png DESTINATION ${CMAKE_INSTALL_PREFIX}/Resources)