Update CMake to only look for Qt5 if RESINSIGHT_BUILD_WITH_QT5 is set

This commit is contained in:
Gaute Lindkvist
2018-12-10 14:49:38 +01:00
parent 81e2132752
commit 17e12a92a0
18 changed files with 75 additions and 19 deletions

View File

@@ -2,7 +2,10 @@ cmake_minimum_required (VERSION 2.8.12)
project (nightcharts)
find_package(Qt5Core CONFIG QUIET)
if (RESINSIGHT_BUILD_WITH_QT5)
find_package(Qt5 COMPONENTS Core QUIET)
endif(RESINSIGHT_BUILD_WITH_QT5)
if (Qt5Core_FOUND)
find_package(Qt5 CONFIG REQUIRED Core Widgets)
else()