[Kst] branches/work/kst/portto4/kst/cmake

Peter Kümmel syntheticpp at gmx.net
Wed Feb 2 21:58:28 CET 2011


SVN commit 1218556 by kuemmel:

cmake packaging on linux

 M  +16 -5     CMakeLists.txt  


--- branches/work/kst/portto4/kst/cmake/CMakeLists.txt #1218555:1218556
@@ -198,12 +198,19 @@
 	set(CPACK_GENERATOR NSIS ZIP)
 	set(CPACK_BINARY_ZIP 1)
 	if (kst_install_prefix)
-		set(CPACK_PACKAGE_FILE_NAME ${kst_install_prefix})
 		set(CPACK_NSIS_PACKAGE_NAME ${kst_install_prefix})
-		set(CPACK_INSTALL_PREFIX "")
 	endif()
 endif()
 
+if (kst_install_prefix)
+	set(CPACK_PACKAGE_FILE_NAME ${kst_install_prefix})
+	set(CPACK_SOURCE_PACKAGE_FILE_NAME ${kst_install_prefix}-sources)
+else()
+	set(CPACK_SOURCE_PACKAGE_FILE_NAME Kst-${kst_version}-sources)
+endif()
+set(CPACK_INSTALL_PREFIX "")
+	
+
 set(CPACK_PACKAGE_NAME   Kst)
 set(CPACK_PACKAGE_VENDOR "The Kst Team")
 set(CPACK_PACKAGE_VERSION_MAJOR ${kst_version_major})
@@ -216,13 +223,17 @@
 set(CPACK_PACKAGE_INSTALL_DIRECTORY "Kst ${kst_version}")
 set(CPACK_STRIP_FILES 1)
 
+#cmake bug, problems with the quotes in the gpl
+if(UNIX)
+	set(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_BINARY_DIR}/gpl)
+	FILE(WRITE ${CPACK_RESOURCE_FILE_LICENSE} "\n\nGNU GENERAL PUBLIC LICENSE, Version 2, June 1991")
+else()
+	set(CPACK_RESOURCE_FILE_LICENSE "${kst_dir}/COPYING")
+endif()
 
-set(CPACK_RESOURCE_FILE_LICENSE       ${kst_dir}/COPYING)
 
-
 # sources
 set(CPACK_SOURCE_INSTALLED_DIRECTORIES "${kst_dir};/") # http://www.mail-archive.com/cmake@cmake.org/msg33720.html
-set(CPACK_SOURCE_PACKAGE_FILE_NAME Kst-${kst_version})
 set(CPACK_SOURCE_GENERATOR TGZ ZIP TBZ2)
 
 # rpm


More information about the Kst mailing list