[cmake] Use default homebrew path for qt5

This commit is contained in:
Ilya Zverev 2017-03-21 11:36:49 +03:00 committed by Sergey Yershov
parent 6c42319830
commit f433a64407

View file

@ -9,6 +9,12 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
set(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR})
if ($ENV{QT_PATH})
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} $ENV{QT_PATH})
else()
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} "/usr/local/opt/qt5")
endif()
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()
@ -92,7 +98,10 @@ if (PYBINDINGS)
endif()
if (NOT PLATFORM_IPHONE AND NOT PLATFORM_ANDROID)
find_package(Qt5Core REQUIRED)
find_package(Qt5Core)
if (NOT Qt5Core_FOUND)
message(FATAL_ERROR "Qt5 cmake files were not found, please set QT_PATH environment variable")
endif()
find_package(Qt5Network REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5OpenGL REQUIRED)