Browse Source

CMakeLists: check if win32 for install path

sithlord48 11 năm trước cách đây
mục cha
commit
ee6a7e3c97
3 tập tin đã thay đổi với 12 bổ sung3 xóa
  1. 2 1
      CMakeLists.txt
  2. 5 1
      PlugIns/Data/CMakeLists.txt
  3. 5 1
      QGearsMain/CMakeLists.txt

+ 2 - 1
CMakeLists.txt

@@ -252,7 +252,8 @@ else()
 	
 	SET(CPACK_DEBIAN_PACKAGE_SECTION games)
 	SET(CPACK_DEBIAN_PACKAGE_PRIORITY extra)
-	SET(CPACK_PACKAGE_EXECUTABLE )
+	#SET(CPACK_PACKAGE_EXECUTABLE )
+	SET(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA ${CMAKE_SOURCE_DIR}/debian/postinst )
 	#set the name to be debian package like.
 	SET(CPACK_PACKAGE_FILE_NAME "q-gears_${CPACK_PACKAGE_VERSION}-${CPACK_DEBIAN_PACKAGE_ARCHITECTURE}")
 	#SET(CPACK_DEBIAN_PACKAGE_DEPENDS "libogre-1.9, libois,libboost-program-options,libboost-filesystem,libvorbis,libopenal,libboost-test,zlib1g")

+ 5 - 1
PlugIns/Data/CMakeLists.txt

@@ -94,5 +94,9 @@ if(NOT QGEARS_STATIC)
   set_target_properties(DataPlugin PROPERTIES
     COMPILE_DEFINITIONS QGEARS_DATAPLUGIN_EXPORTS
   )
-  install(TARGETS DataPlugin LIBRARY DESTINATION .)
+    if(WIN32)
+    install(TARGETS DataPlugin LIBRARY DESTINATION .)
+  else()
+    install(TARGETS DataPlugin LIBRARY DESTINATION ./lib/q-gears/plugins/)
+  endif()
 endif()

+ 5 - 1
QGearsMain/CMakeLists.txt

@@ -349,4 +349,8 @@ target_link_libraries(q-gears
 	${Boost_LIBRARIES}
 )
 
-install(TARGETS q-gears DESTINATION .)
+if(WIN32)
+  install(TARGETS q-gears DESTINATION .)
+else()
+  install(TARGETS q-gears RUNTIME DESTINATION ./games)
+endif()