Use right way of finding and using Qt4 in CMake
authorunc0rr
Mon, 26 Feb 2007 17:09:13 +0000
changeset 494 503758a35c02
parent 493 0c0ed17ad675
child 495 62c1c2b4414c
Use right way of finding and using Qt4 in CMake
QTfrontend/CMakeLists.txt
--- a/QTfrontend/CMakeLists.txt	Sat Feb 24 17:25:59 2007 +0000
+++ b/QTfrontend/CMakeLists.txt	Mon Feb 26 17:09:13 2007 +0000
@@ -1,8 +1,13 @@
 set(QT_MIN_VERSION "4.2.0")
 
+set(QT_USE_QTNETWORK TRUE)
+set(QT_USE_QTSVG TRUE)
+set(QT_USE_QTMAIN TRUE)
+
 find_package(Qt4 REQUIRED)
+include(${QT_USE_FILE}) 
 
-include_directories(${QT_INCLUDES} .)
+include_directories(.)
 
 if(WIN32 AND NOT UNIX)
 	set(HEDGEWARS_BINDIR ".")
@@ -101,11 +106,7 @@
 	${hwfr_rez_src})
 
 target_link_libraries(hedgewars 
-	${QT_QTCORE_LIBRARY}
-	${QT_QTGUI_LIBRARY}
-	${QT_QTNETWORK_LIBRARY}
-	${QT_QTSVG_LIBRARY}
-	${QT_QTMAIN_LIBRARY})
+	${QT_LIBRARIES})
 
 install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION bin)