mirror of
https://github.com/clementine-player/Clementine
synced 2025-01-05 14:28:40 +01:00
e7364263b2
Compatibility with versions prior to 2.8.12 is being deprecated, resulting in build warning messages. The minimum for the official supported distros is 3.7.2 (Stretch), so the version could be moved forward when newer features are required. Reference: https://cmake.org/cmake/help/v3.19/release/3.19.html#deprecated-and-removed-features
36 lines
761 B
CMake
36 lines
761 B
CMake
cmake_minimum_required(VERSION 3.0.0)
|
|
set(CMAKE_CXX_STANDARD 11)
|
|
|
|
set(QXT-SOURCES
|
|
qxtglobal.cpp
|
|
qxtglobalshortcut.cpp
|
|
)
|
|
|
|
set(QXT-MOC-HEADERS
|
|
qxtglobalshortcut.h
|
|
)
|
|
|
|
include_directories(${X11_INCLUDE_DIR})
|
|
include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS})
|
|
|
|
if(WIN32)
|
|
set(QXT-SOURCES ${QXT-SOURCES} qxtglobalshortcut_win.cpp)
|
|
elseif(APPLE)
|
|
set(QXT-SOURCES ${QXT-SOURCES} qxtglobalshortcut_mac.cpp)
|
|
else(WIN32)
|
|
set(QXT-SOURCES ${QXT-SOURCES} qxtglobalshortcut_x11.cpp)
|
|
endif(WIN32)
|
|
|
|
QT5_WRAP_CPP(QXT-SOURCES-MOC ${QXT-MOC-HEADERS})
|
|
|
|
ADD_LIBRARY(qxt STATIC
|
|
${QXT-SOURCES}
|
|
${QXT-SOURCES-MOC}
|
|
)
|
|
|
|
if(WIN32)
|
|
target_link_libraries(qxt Qt5::Core Qt5::Widgets)
|
|
else(WIN32)
|
|
target_link_libraries(qxt Qt5::Core Qt5::Widgets Qt5::X11Extras)
|
|
endif(WIN32)
|