]> vaikene.ee Git - evaf/blobdiff - src/libs/Common/CMakeLists.txt
Ported to Qt5
[evaf] / src / libs / Common / CMakeLists.txt
index a9916b4b4dcd9d957632c78045be30d8070ca7ed..ce5f10cda42580644eb007deaf79a305272b55ac 100644 (file)
@@ -1,10 +1,6 @@
 # Name of the target
 set(TARGET CommonLib)
 
-# Qt modules
-set(QT_DONT_USE_QTGUI TRUE)
-include(${QT_USE_FILE})
-
 # Needed for exporting/importing symbols
 add_definitions(-DCOMMON_LIBRARY)
 
@@ -45,14 +41,16 @@ set(MOC_HDRS
 )
 
 # Version info resource file for Windows builds
-if(WIN32)
+if(WIN32 AND NOT MINGW)
     set(SRCS ${SRCS} version.rc)
-endif(WIN32)
+endif(WIN32 AND NOT MINGW)
 
-qt4_wrap_cpp(MOC_SRCS ${MOC_HDRS})
+qt5_wrap_cpp(MOC_SRCS ${MOC_HDRS})
 
 add_library(${TARGET} SHARED ${SRCS} ${MOC_SRCS})
 
-target_link_libraries(${TARGET} ${QT_LIBRARIES} ${eVaf_LIBRARIES})
+qt5_use_modules(${TARGET} Core)
+
+target_link_libraries(${TARGET} ${eVaf_LIBRARIES})
 
 install(TARGETS ${TARGET} DESTINATION bin)