mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-24 00:31:36 +01:00
4ff370ce1e
* Qt5::Test is not required in the global QT_LIBRARIES definition
* Qt5::DBus had already been optional, drop bogus pkgconfig search
This partially reverts commit 4321ecf7d2
.
* Find X11 only once, in root CMakeLists.txt
Since we have HAVE_X11, use HAVE_X11 in cmake.
36 lines
762 B
CMake
36 lines
762 B
CMake
cmake_minimum_required(VERSION 2.8.11)
|
|
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)
|