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

Peter Kümmel syntheticpp at gmx.net
Thu Feb 10 18:48:39 CET 2011


SVN commit 1219739 by kuemmel:

- also use icon when compiled with mingw
- add  shortcut to binary in start menu

 M  +2 -0      cmake/CMakeLists.txt  
 M  +11 -2     cmake/src/kst/CMakeLists.txt  
 M  +1 -1      src/kst/kst_icon.rc  


--- branches/work/kst/portto4/kst/cmake/CMakeLists.txt #1219738:1219739
@@ -212,11 +212,13 @@
 	
 
 set(CPACK_PACKAGE_NAME   Kst)
+set(CPACK_PACKAGE_EXECUTABLES ${kst_binary_name} ${kst_binary_name})
 set(CPACK_PACKAGE_VENDOR "The Kst Team")
 set(CPACK_PACKAGE_VERSION_MAJOR ${kst_version_major})
 set(CPACK_PACKAGE_VERSION_MINOR ${kst_version_minor})
 set(CPACK_PACKAGE_VERSION_PATCH ${kst_version_patch})
 
+
 set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Kst 2")
 set(CPACK_PACKAGE_DESCRIPTION_FILE    ${kst_dir}/README)
 set(CPACK_PACKAGE_CONTACT "http://bugs.kde.org}")
--- branches/work/kst/portto4/kst/cmake/src/kst/CMakeLists.txt #1219738:1219739
@@ -4,9 +4,18 @@
 
 kst_files_find(src/kst)
 
-if(MSVC)
-	set(rc_file ${kst_dir}/src/kst/kst_icon.rc)
+if(WIN32)
+	configure_file(${kst_dir}/src/kst/kst_icon.rc ${CMAKE_CURRENT_BINARY_DIR}/kst_icon.rc)
+	if(MINGW)
+	    add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/kst_icon.o
+		                   COMMAND windres.exe -I${CMAKE_CURRENT_BINARY_DIR}
+		                   -i${CMAKE_CURRENT_BINARY_DIR}/kst_icon.rc
+		                   -o ${CMAKE_CURRENT_BINARY_DIR}/kst_icon.o)
+		set(rc_file ${CMAKE_CURRENT_BINARY_DIR}/kst_icon.o)
+	else()
+		set(rc_file ${CMAKE_CURRENT_BINARY_DIR}/kst_icon.rc)
 endif()
+endif()
 
 kst_add_resources(src/images/images.qrc)
 
--- branches/work/kst/portto4/kst/src/kst/kst_icon.rc #1219738:1219739
@@ -1 +1 @@
-IDI_ICON1               ICON    DISCARDABLE     "../images/kst.ico"
+IDI_ICON1               ICON    DISCARDABLE     "${kst_dir}/src/images/kst.ico"


More information about the Kst mailing list