CMakeLists.txt 1.19 KB
Newer Older
Alf Gaida's avatar
Alf Gaida committed
1 2 3 4 5
cmake_minimum_required(VERSION 3.0.2 FATAL_ERROR)
project(pavucontrol-qt)

option(UPDATE_TRANSLATIONS "Update source translation translations/*.ts files" OFF)

6
set(LXQTBT_MINIMUM_VERSION "0.4.0")
Alf Gaida's avatar
Alf Gaida committed
7 8 9 10 11 12 13 14 15
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)

include(GNUInstallDirs)

16 17
find_package(Qt5Widgets REQUIRED)
find_package(Qt5LinguistTools REQUIRED)
18
find_package(Qt5DBus REQUIRED)
Alf Gaida's avatar
Alf Gaida committed
19

20
find_package(lxqt-build-tools ${LXQTBT_MINIMUM_VERSION} REQUIRED)
Alf Gaida's avatar
Alf Gaida committed
21

22 23 24 25 26 27 28 29 30 31
if(NOT CMAKE_BUILD_TYPE)
    set(CMAKE_BUILD_TYPE Release)
endif()

set(PAVUCONTROLQT_MAJOR_VERSION 0)
set(PAVUCONTROLQT_MINOR_VERSION 3)
set(PAVUCONTROLQT_PATCH_VERSION 0)
set(PAVUCONTROLQT_VERSION ${PAVUCONTROLQT_MAJOR_VERSION}.${PAVUCONTROLQT_MINOR_VERSION}.${PAVUCONTROLQT_PATCH_VERSION})
add_definitions("-DPAVUCONTROLQT_VERSION=\"${PAVUCONTROLQT_VERSION}\"")

Alf Gaida's avatar
Alf Gaida committed
32 33 34
include(LXQtCompilerSettings NO_POLICY_SCOPE)
include(LXQtTranslate)

35
find_package(PkgConfig REQUIRED)
Alf Gaida's avatar
Alf Gaida committed
36 37 38 39 40 41 42 43 44 45 46 47
pkg_check_modules(
    PULSE REQUIRED
    libpulse>=5.0
    libpulse-mainloop-glib>=0.9.16
)
pkg_check_modules(
    GLIB REQUIRED
    glib-2.0
)

add_subdirectory(src)