Qt-Advanced-Docking-System/adsConfig.cmake
Christian Seiler 0c88457037
Fix CMake build on macOS (don't try to link against Qt's X11Extras) (#267)
macOS is identified as UNIX by CMake, but Qt doesn't actually use X11
there (and X11 support is not available by default anyway). Change the
condition that includes X11Extras to if (UNIX AND NOT APPLE) instead of
just if (UNIX) to mitigate that. This makes the build on macOS work
with CMake.

Co-authored-by: Christian Seiler <c.seiler@luxflux.de>
2020-10-21 22:05:36 +02:00

8 lines
357 B
CMake

include(CMakeFindDependencyMacro)
find_dependency(Qt5Core ${REQUIRED_QT_VERSION} REQUIRED)
find_dependency(Qt5Gui ${REQUIRED_QT_VERSION} REQUIRED)
find_dependency(Qt5Widgets ${REQUIRED_QT_VERSION} REQUIRED)
if(UNIX AND NOT APPLE)
find_dependency(Qt5X11Extras ${REQUIRED_QT_VERSION} REQUIRED)
endif()
include("${CMAKE_CURRENT_LIST_DIR}/adsTargets.cmake")