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

Peter Kümmel syntheticpp at gmx.net
Wed Jan 12 13:26:40 CET 2011


SVN commit 1213988 by kuemmel:

cmake: add d2asc

 M  +0 -1      INSTALL  
 M  +27 -1     cmake/CMakeLists.txt  
 M  +25 -2     cmake/modules/KstMacros.cmake  
 M  +2 -1      cmake/src/CMakeLists.txt  
 A             cmake/src/d2asc (directory)  
 AM            cmake/src/d2asc/CMakeLists.txt  
 A             cmake/src/d2d (directory)  
 AM            cmake/src/d2d/CMakeLists.txt  
 M  +4 -43     cmake/src/kst/CMakeLists.txt  
 M  +2 -0      cmake/src/libkst/CMakeLists.txt  


--- branches/work/kst/portto4/kst/INSTALL #1213987:1213988
@@ -129,6 +129,5 @@
 	- install on Mac
 	- add package rules
 	- add support for pre-compiled headers
-	- only the kst binary is generated
 	- build and run tests
 	- have a look at kst1's cmake files, especially the 3rd party lib code
--- branches/work/kst/portto4/kst/cmake/CMakeLists.txt #1213987:1213988
@@ -103,7 +103,7 @@
 endif()
 
 if(WIN32)
-	set(CMAKE_DEBUG_POSTFIX d)
+	set(kst_debug_postfix d)
 endif()
 
 configure_file(${kst_dir}/cmake/config.h.cmake ${CMAKE_BINARY_DIR}/config.h)
@@ -130,3 +130,29 @@
 
 
 
+if(WIN32)
+	install(FILES
+		${QT_BINARY_DIR}/QtCore4.dll
+		${QT_BINARY_DIR}/QtGui4.dll
+		${QT_BINARY_DIR}/QtXml4.dll
+		${QT_BINARY_DIR}/QtOpenGL4.dll
+		${QT_BINARY_DIR}/QtSvg4.dll
+		DESTINATION bin
+		CONFIGURATIONS Release)
+	install(FILES
+		${QT_BINARY_DIR}/QtCored4.dll
+		${QT_BINARY_DIR}/QtGuid4.dll
+		${QT_BINARY_DIR}/QtXmld4.dll
+		${QT_BINARY_DIR}/QtOpenGLd4.dll
+		${QT_BINARY_DIR}/QtSvgd4.dll
+		DESTINATION bin
+		CONFIGURATIONS Debug)
+endif()
+
+if(MINGW)
+	get_filename_component(MINGW_BIN_PATH ${CMAKE_CXX_COMPILER} PATH)
+	install(FILES 
+		${MINGW_BIN_PATH}/libgcc_s_dw2-1.dll
+		${MINGW_BIN_PATH}/mingwm10.dll
+		DESTINATION bin)
+endif()
\ No newline at end of file
--- branches/work/kst/portto4/kst/cmake/modules/KstMacros.cmake #1213987:1213988
@@ -43,6 +43,27 @@
 endmacro()
 
 
+macro(kst_add_executable)
+	include_directories(${kst_${kst_name}_folder} ${CMAKE_CURRENT_BINARY_DIR})
+	add_executable(${kst_name} ${ARGN} ${kst_${kst_name}_sources} ${kst_${kst_name}_headers} ${kst_${kst_name}_info_files})
+	target_link_libraries(${kst_name} ${kst_qtmain_library})
+	set_property(TARGET ${kst_name} PROPERTY DEBUG_POSTFIX ${kst_debug_postfix})
+endmacro()
+
+
+macro(kst_install_executable)
+	install(TARGETS ${kst_name} 
+		RUNTIME DESTINATION bin
+		BUNDLE DESTINATION bin)
+	#if(APPLE)
+	#	#TODO does not work
+	#	set(bdir ${CMAKE_INSTALL_PREFIX}/bin ${CMAKE_INSTALL_PREFIX}/lib ${CMAKE_INSTALL_PREFIX}/plugin)
+	#	set(blib ${CMAKE_INSTALL_PREFIX}/lib/libkstcore.dylib ${CMAKE_INSTALL_PREFIX}/lib/libkstapp.dylib ${CMAKE_INSTALL_PREFIX}/lib/libkstwidgets.dylib ${CMAKE_INSTALL_PREFIX}/lib/libkstmath.dylib)#
+	#	install(CODE "include(BundleUtilities) fixup_bundle(kst \"${blib}\" \"${bdir}\")" COMPONENT RUNTIME)
+	#endif()
+endmacro()
+
+
 macro(kst_add_library type)
 	include_directories(${kst_${kst_name}_folder} ${CMAKE_CURRENT_BINARY_DIR})
 	string(TOUPPER BUILD_${kst_name} _build_macro)
@@ -63,7 +84,7 @@
 	else()
 		add_library(${kst_name} ${type} ${kst_${kst_name}_sources} ${kst_${kst_name}_headers} ${svnversion_h})
 	endif()
-	target_link_libraries(${kst_name} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTXML_LIBRARY})
+	set_property(TARGET ${kst_name} PROPERTY DEBUG_POSTFIX ${kst_debug_postfix})
 	if(WIN32)
 		install(TARGETS ${kst_name} RUNTIME DESTINATION bin
 		                            ARCHIVE DESTINATION lib)
@@ -108,7 +129,8 @@
 
 
 macro(kst_link)
-	target_link_libraries(${kst_name} ${ARGV})
+	target_link_libraries(${kst_name} ${ARGV}
+		${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${QT_QTXML_LIBRARY} ${QT_QTOPENGL_LIBRARY} ${QT_QTSVG_LIBRARY})
 endmacro()
 
 
@@ -182,6 +204,7 @@
 	set(kst_${kst_name}_info_files ${kst_${kst_name}_info_files} ${kst_${group}_info_files})
 endmacro()
 
+
 macro(kst_find_info_files group files)
 	file(GLOB _filelist ${files})
 	kst_add_info_files(${group} ${_filelist})
--- branches/work/kst/portto4/kst/cmake/src/CMakeLists.txt #1213987:1213988
@@ -7,6 +7,7 @@
 add_subdirectory(datasources)
 add_subdirectory(plugins)
 
+add_subdirectory(d2asc)
+#add_subdirectory(d2d)
 
 
-
--- branches/work/kst/portto4/kst/cmake/src/kst/CMakeLists.txt #1213987:1213988
@@ -10,8 +10,6 @@
 
 kst_add_resources(src/images/images.qrc)
 
-kst_include_directories(kstapp)
-
 kst_find_info_files(KstCMakeFiles ${kst_dir}/cmake/*)
 kst_find_info_files(KstCMakeFiles ${kst_dir}/cmake/modules/*)
 
@@ -20,47 +18,10 @@
 	${kst_dir}/NEWS
 	${kst_dir}/README)
 
-add_executable(kst ${kst_win32} ${kst_kst_sources} ${rc_file} ${kst_kst_info_files})
+kst_include_directories(kstapp)
 
-kst_link(kstcore kstmath kstapp kstwidgets ${QT_QTOPENGL_LIBRARY} ${QT_QTSVG_LIBRARY} ${kst_qtmain_library})
+kst_add_executable(${kst_win32} ${rc_file})
 
+kst_link(kstcore kstmath kstapp kstwidgets)
 
-install(TARGETS kst 
-	RUNTIME DESTINATION bin
-	BUNDLE DESTINATION bin)
-	
-if(APPLE)
-	#TODO does not work
-	set(bdir ${CMAKE_INSTALL_PREFIX}/bin ${CMAKE_INSTALL_PREFIX}/lib ${CMAKE_INSTALL_PREFIX}/plugin)
-	set(blib ${CMAKE_INSTALL_PREFIX}/lib/libkstcore.dylib ${CMAKE_INSTALL_PREFIX}/lib/libkstapp.dylib ${CMAKE_INSTALL_PREFIX}/lib/libkstwidgets.dylib ${CMAKE_INSTALL_PREFIX}/lib/libkstmath.dylib)
-	install(CODE "include(BundleUtilities) fixup_bundle(kst \"${blib}\" \"${bdir}\")" COMPONENT RUNTIME)
-endif()
-
-if(WIN32)
-	install(FILES
-		${QT_BINARY_DIR}/QtCore4.dll
-		${QT_BINARY_DIR}/QtGui4.dll
-		${QT_BINARY_DIR}/QtXml4.dll
-		${QT_BINARY_DIR}/QtOpenGL4.dll
-		${QT_BINARY_DIR}/QtSvg4.dll
-		DESTINATION bin
-		CONFIGURATIONS Release)
-	install(FILES
-		${QT_BINARY_DIR}/QtCored4.dll
-		${QT_BINARY_DIR}/QtGuid4.dll
-		${QT_BINARY_DIR}/QtXmld4.dll
-		${QT_BINARY_DIR}/QtOpenGLd4.dll
-		${QT_BINARY_DIR}/QtSvgd4.dll
-		DESTINATION bin
-		CONFIGURATIONS Debug)
-endif()
-
-if(MINGW)
-	get_filename_component(MINGW_BIN_PATH ${CMAKE_CXX_COMPILER} PATH)
-	install(FILES 
-		${MINGW_BIN_PATH}/libgcc_s_dw2-1.dll
-		${MINGW_BIN_PATH}/mingwm10.dll
-		DESTINATION bin)
-endif()
-
-
+kst_install_executable()
--- branches/work/kst/portto4/kst/cmake/src/libkst/CMakeLists.txt #1213987:1213988
@@ -13,3 +13,5 @@
 kst_dont_merge(sysinfo.c psversion.c)
 
 kst_add_library(SHARED)
+
+kst_link()


More information about the Kst mailing list