X-Git-Url: https://vaikene.ee/gitweb/pswgen09.html?a=blobdiff_plain;f=src%2Fmain%2FGUI%2FCMakeLists.txt;h=cfb011c9750947b4f8f39b75f33ecfb08aa71697;hb=HEAD;hp=4e1c0d8664878bcf208ec62db104721ab2e4a7ce;hpb=4bf2068a0d16afd45cd171548da6320095d0851e;p=evaf
diff --git a/src/main/GUI/CMakeLists.txt b/src/main/GUI/CMakeLists.txt
index 4e1c0d8..cfb011c 100644
--- a/src/main/GUI/CMakeLists.txt
+++ b/src/main/GUI/CMakeLists.txt
@@ -1,10 +1,6 @@
# Name of the target
set(TARGET eVafGUI)
-# Qt modules
-set(QT_USE_QTMAIN TRUE)
-include(${QT_USE_FILE})
-
# Include files
include_directories(${eVaf_INCLUDE})
@@ -38,16 +34,18 @@ set(RCCS
)
# Version info resource file for Windows builds
-if(WIN32)
+if(WIN32 AND NOT MINGW)
set(SRCS ${SRCS} version.rc gui.rc)
-endif(WIN32)
+endif(WIN32 AND NOT MINGW)
-qt4_add_resources(RCC_SRCS ${RCCS})
+qt5_add_resources(RCC_SRCS ${RCCS})
-qt4_wrap_cpp(MOC_SRCS ${MOC_HDRS})
+qt5_wrap_cpp(MOC_SRCS ${MOC_HDRS})
add_executable(${TARGET} WIN32 ${SRCS} ${MOC_SRCS} ${RCC_SRCS})
-target_link_libraries(${TARGET} ${QT_LIBRARIES} ${eVaf_LIBRARIES})
+qt5_use_modules(${TARGET} Core Widgets)
+
+target_link_libraries(${TARGET} ${eVaf_LIBRARIES})
install(TARGETS ${TARGET} DESTINATION bin)