-
-
Notifications
You must be signed in to change notification settings - Fork 21
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
61 lines (48 loc) · 1.39 KB
/
CMakeLists.txt
File metadata and controls
61 lines (48 loc) · 1.39 KB
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
cmake_minimum_required(VERSION 3.19)
file(READ "${CMAKE_SOURCE_DIR}/VERSION" VER_RAW)
string(STRIP ${VER_RAW} HYPRPWCENTER_VERSION)
add_compile_definitions(HYPRPWCENTER_VERSION="${HYPRPWCENTER_VERSION}")
project(
hyprpwcenter
VERSION ${HYPRPWCENTER_VERSION}
DESCRIPTION "Volume management center for Hyprland")
include(CTest)
include(CheckIncludeFile)
include(GNUInstallDirs)
set(PREFIX ${CMAKE_INSTALL_PREFIX})
set(INCLUDE ${CMAKE_INSTALL_FULL_INCLUDEDIR})
set(LIBDIR ${CMAKE_INSTALL_FULL_LIBDIR})
find_package(PkgConfig REQUIRED)
pkg_check_modules(
deps
REQUIRED
IMPORTED_TARGET
libpipewire-0.3
hyprtoolkit
pixman-1
libdrm
hyprutils>=0.10.2
)
set(CMAKE_CXX_STANDARD 23)
add_compile_options(
-Wall
-Wextra
-Wno-unused-parameter
-Wno-unused-value
-Wno-missing-field-initializers
-Wpedantic)
set(CMAKE_EXPORT_COMPILE_COMMANDS TRUE)
if(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG)
message(STATUS "Configuring hyprpwcenter in Debug")
add_compile_definitions(hyprpwcenter_DEBUG)
else()
add_compile_options(-O3)
message(STATUS "Configuring hyprpwcenter in Release")
endif()
file(GLOB_RECURSE SRCFILES CONFIGURE_DEPENDS "src/*.cpp" "include/*.hpp")
add_executable(hyprpwcenter ${SRCFILES})
target_link_libraries(hyprpwcenter PkgConfig::deps)
install(
FILES contrib/hyprpwcenter.desktop
DESTINATION "share/applications")
install(TARGETS hyprpwcenter)