Fix build with Qt 5.11.0_beta3 (qt5_use_modules is gone)

pull/1966/head
Andreas Sturmlechner 2018-05-16 13:45:25 +02:00
parent 8f587b9750
commit 7251c3c51a
1 changed files with 2 additions and 3 deletions

View File

@ -3,7 +3,7 @@ project(assimp_qt_viewer)
cmake_minimum_required(VERSION 2.6)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5 COMPONENTS Gui Widgets OpenGL REQUIRED)
find_package(DevIL REQUIRED)
find_package(OpenGL REQUIRED)
@ -25,9 +25,8 @@ qt5_wrap_ui(UISrcs mainwindow.ui)
qt5_wrap_cpp(MOCrcs mainwindow.hpp glview.hpp)
add_executable(${PROJECT_NAME} ${assimp_qt_viewer_SRCS} ${UISrcs} ${MOCrcs})
target_link_libraries(${PROJECT_NAME} ${QT_LIBRARIES} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTOPENGL_LIBRARY} ${IL_LIBRARIES} ${OPENGL_LIBRARIES} assimp)
target_link_libraries(${PROJECT_NAME} Qt5::Gui Qt5::Widgets Qt5::OpenGL ${IL_LIBRARIES} ${OPENGL_LIBRARIES} assimp)
qt5_use_modules(${PROJECT_NAME} Widgets OpenGL)
if(WIN32) # Check if we are on Windows
if(MSVC) # Check if we are using the Visual Studio compiler
#set_target_properties(TestProject PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS")