diff --git a/.travis.yml b/.travis.yml index 27c3dd00..16bb1a02 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,7 +15,7 @@ branches: env: global: - GITHUB_REPO: pfcrender - - QT_ROOT: 'usr/local/qt5' + #additional deps addons: @@ -47,7 +47,7 @@ install: - if [[ $TRAVIS_OS_NAME == 'linux' ]] ; then sudo apt-get install qt59-meta-full ; fi - if [[ $TRAVIS_OS_NAME == 'linux' ]] ; then source /opt/qt59/bin/qt59-env.sh ; fi - if [[ $TRAVIS_OS_NAME == 'osx' ]] ; then brew install qt5 ; fi - - if [[ $TRAVIS_OS_NAME == 'osx' ]] ; then brew link qt5 --force ; fi +# - if [[ $TRAVIS_OS_NAME == 'osx' ]] ; then brew link --force qt5 && ln -s /usr/local/Cellar/qt5/5.9.1/mkspecs /usr/local/mkspecs && ln -s /usr/local/Cellar/qt5/5.9.1/plugins /usr/local/plugins ; fi script: - cd bin && cmake .. && make && make test diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 5b9bbfe0..f89dc629 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -6,6 +6,14 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) +if(APPLE AND EXISTS /usr/local/opt/qt5) + # 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() + + #Check for Qt5 find_package(Qt5Core REQUIRED)