1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2024-12-18 19:42:53 +01:00
strawberry-audio-player-win.../3rdparty/qxt/CMakeLists.txt

44 lines
1.2 KiB
CMake
Raw Normal View History

2018-02-27 18:06:05 +01:00
cmake_minimum_required(VERSION 2.8.11)
2018-05-14 17:57:37 +02:00
set(CMAKE_CXX_STANDARD 11)
2018-02-27 18:06:05 +01:00
include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS})
if (NOT WIN32 AND NOT APPLE)
find_path(HAVE_QPA_QPLATFORMNATIVEINTERFACE_H qpa/qplatformnativeinterface.h PATHS ${Qt5Gui_PRIVATE_INCLUDE_DIRS})
if(NOT HAVE_QPA_QPLATFORMNATIVEINTERFACE_H)
message(FATAL_ERROR "Missing qpa/qplatformnativeinterface.h, check that you got the QT private headers installed (package libQt5Gui-private-headers-devel, qtbase5-private-dev or similar)")
endif(NOT HAVE_QPA_QPLATFORMNATIVEINTERFACE_H)
endif(NOT WIN32 AND NOT APPLE)
2018-02-27 18:06:05 +01:00
set(QXT-SOURCES
qxtglobal.cpp
qxtglobalshortcut.cpp
)
set(QXT-MOC-HEADERS
qxtglobalshortcut.h
)
find_package(X11)
include_directories(${X11_INCLUDE_DIR})
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)
2018-02-27 18:06:05 +01:00
else(WIN32)
target_link_libraries(qxt Qt5::Core Qt5::Widgets Qt5::X11Extras)
2018-02-27 18:06:05 +01:00
endif(WIN32)