QTfrontend/CMakeLists.txt
changeset 13299 6fda879d5052
parent 13222 d6364e31f9c9
child 13515 c5365f05d4de
--- a/QTfrontend/CMakeLists.txt	Fri Mar 30 15:02:10 2018 +0200
+++ b/QTfrontend/CMakeLists.txt	Fri Mar 30 15:16:29 2018 +0200
@@ -1,3 +1,12 @@
+if(APPLE AND EXISTS /usr/local/opt/qt5)
+	# Special treatment for OS X users who
+	# install Qt5 via Homebrew.
+	# Homebrew installs Qt5 (up to at least 5.9.1) in
+	# /usr/local/qt5, ensure it can be found by CMake since
+	# it is not in the default /usr/local prefix.
+	list(APPEND CMAKE_PREFIX_PATH "/usr/local/opt/qt5")
+endif()
+
 find_package(Qt5 COMPONENTS Core Widgets Gui Network)
 
 include_directories(${Qt5Core_PRIVATE_INCLUDE_DIRS})