diff --git a/adsConfig.cmake b/adsConfig.cmake index d006a3f..9f9b307 100644 --- a/adsConfig.cmake +++ b/adsConfig.cmake @@ -2,5 +2,7 @@ include(CMakeFindDependencyMacro) find_dependency(Qt5Core ${REQUIRED_QT_VERSION} REQUIRED) find_dependency(Qt5Gui ${REQUIRED_QT_VERSION} REQUIRED) find_dependency(Qt5Widgets ${REQUIRED_QT_VERSION} REQUIRED) -find_dependency(Qt5X11Extras ${REQUIRED_QT_VERSION} REQUIRED) +if(UNIX AND NOT APPLE) + find_dependency(Qt5X11Extras ${REQUIRED_QT_VERSION} REQUIRED) +endif() include("${CMAKE_CURRENT_LIST_DIR}/adsTargets.cmake") \ No newline at end of file diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0bd721d..b0ca9ba 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.5) project(QtAdvancedDockingSystem LANGUAGES CXX VERSION ${VERSION_SHORT}) find_package(Qt5 5.5 COMPONENTS Core Gui Widgets REQUIRED) -if (UNIX) +if (UNIX AND NOT APPLE) find_package(Qt5 5.5 COMPONENTS X11Extras REQUIRED) endif() set(CMAKE_INCLUDE_CURRENT_DIR ON) @@ -48,7 +48,7 @@ set(ads_HEADERS IconProvider.h DockComponentsFactory.h ) -if (UNIX) +if (UNIX AND NOT APPLE) set(ads_SRCS linux/FloatingWidgetTitleBar.cpp ${ads_SRCS}) set(ads_HEADERS linux/FloatingWidgetTitleBar.h ${ads_HEADERS}) endif() @@ -60,7 +60,7 @@ else() target_compile_definitions(qtadvanceddocking PRIVATE ADS_SHARED_EXPORT) endif() target_link_libraries(qtadvanceddocking PUBLIC Qt5::Core Qt5::Gui Qt5::Widgets) -if (UNIX) +if (UNIX AND NOT APPLE) target_link_libraries(qtadvanceddocking PUBLIC Qt5::X11Extras) endif() set_target_properties(qtadvanceddocking PROPERTIES