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

@@ -7,7 +7,10 @@ if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267")
endif()
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 Concurrent Core OpenGL PrintSupport Widgets)
else()