QTfrontend/CMakeLists.txt
changeset 495 62c1c2b4414c
parent 494 503758a35c02
child 502 bc178daca088
equal deleted inserted replaced
494:503758a35c02 495:62c1c2b4414c
     1 set(QT_MIN_VERSION "4.2.0")
     1 set(QT_MIN_VERSION "4.2.0")
     2 
     2 
     3 set(QT_USE_QTNETWORK TRUE)
     3 set(QT_USE_QTNETWORK TRUE)
     4 set(QT_USE_QTSVG TRUE)
     4 set(QT_USE_QTSVG TRUE)
       
     5 set(QT_USE_QTXML TRUE)
     5 set(QT_USE_QTMAIN TRUE)
     6 set(QT_USE_QTMAIN TRUE)
     6 
     7 
     7 find_package(Qt4 REQUIRED)
     8 find_package(Qt4 REQUIRED)
     8 include(${QT_USE_FILE}) 
     9 include(${QT_USE_FILE}) 
     9 
    10 
   102 add_executable(hedgewars WIN32
   103 add_executable(hedgewars WIN32
   103 	${hwfr_src}
   104 	${hwfr_src}
   104 	${hwfr_moc_srcs}
   105 	${hwfr_moc_srcs}
   105 	${hwfr_hdrs}
   106 	${hwfr_hdrs}
   106 	${hwfr_rez_src})
   107 	${hwfr_rez_src})
       
   108 	
       
   109 set(HW_LINK_LIBS ${QT_LIBRARIES})
       
   110 
       
   111 if(WIN32 AND NOT UNIX)
       
   112 	set(HW_LINK_LIBS 
       
   113 		${HW_LINK_LIBS}
       
   114 		ole32
       
   115 		winspool
       
   116 		uuid)
       
   117 endif(WIN32 AND NOT UNIX)
   107 
   118 
   108 target_link_libraries(hedgewars 
   119 target_link_libraries(hedgewars 
   109 	${QT_LIBRARIES})
   120 	${HW_LINK_LIBS})
   110 
   121 
   111 install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION bin)
   122 install(PROGRAMS "${EXECUTABLE_OUTPUT_PATH}/hedgewars${CMAKE_EXECUTABLE_SUFFIX}" DESTINATION bin)
   112 
       
   113 
       
   114 if(WIN32 AND NOT UNIX)
       
   115 	string(REPLACE "\\" "/" QT_BIN_DIR $ENV{QTDIR}/bin)
       
   116 
       
   117 	install(FILES
       
   118 		"${QT_BIN_DIR}/QtNetwork4.dll"
       
   119 		"${QT_BIN_DIR}/QtGui4.dll"
       
   120 		"${QT_BIN_DIR}/QtCore4.dll"
       
   121 		"${QT_BIN_DIR}/QtSvg4.dll"
       
   122 		"${QT_BIN_DIR}/QtXml4.dll"
       
   123 		"${QT_BIN_DIR}/mingwm10.dll"
       
   124 		DESTINATION bin)
       
   125 endif(WIN32 AND NOT UNIX)