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

Peter Kümmel syntheticpp at gmx.net
Sat Feb 12 19:31:41 CET 2011


SVN commit 1220051 by kuemmel:

suppress other generators

 M  +11 -13    CMakeLists.txt  
 M  +7 -1      modules/KstMacros.cmake  


--- branches/work/kst/portto4/kst/cmake/CMakeLists.txt #1220050:1220051
@@ -186,11 +186,12 @@
 	add_subdirectory(tests)
 endif()
 
+if (NOT APPLE)
 add_subdirectory(misc)
+endif()
 
 
 
-
 # CPack packaging
 #
 # http://cmake.org/cmake/help/cmake-2-8-docs.html#module:CPack
@@ -279,28 +280,25 @@
 
 
 if(APPLE)
+	set(app ${CMAKE_BINARY_DIR}/bin/${kst_binary_name}.app)
 	set(contents_dir ${kst_binary_name}.app/Contents)
-	#install(DIRECTORY "${QT_PLUGINS_DIR}/imageformats" DESTINATION  ${contents_dir}/plugins COMPONENT Runtime)
-	install(DIRECTORY "${CMAKE_BINARY_DIR}/plugins"    DESTINATION  ${contents_dir} COMPONENT Runtime)
+	#TODO copy not intsall install(DIRECTORY "${QT_PLUGINS_DIR}/imageformats" DESTINATION  ${contents_dir}/plugins COMPONENT Runtime)
+	
 	file(WRITE ${CMAKE_BINARY_DIR}/qt.conf "")
 	install(FILES ${CMAKE_BINARY_DIR}/qt.conf DESTINATION ${contents_dir}/Resources COMPONENT Runtime)
 	
-	set(bapp ${CMAKE_BINARY_DIR}/bin/kst2.app)
-	set(bdir ${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_PREFIX}/lib ${CMAKE_INSTALL_PREFIX}/plugin)
+	
+	#set(bdir ${CMAKE_INSTALL_PREFIX} ${CMAKE_INSTALL_PREFIX}/lib ${CMAKE_INSTALL_PREFIX}/plugin)
 	install(CODE 
 		"file(GLOB qt_plugins \"\${CMAKE_INSTALL_PREFIX}/${contents_dir}/plugins/imageformats/*${CMAKE_SHARED_LIBRARY_SUFFIX}\")
-		file(GLOB kst_plugins \"\${CMAKE_BINARY_DIR}/plugins/*${CMAKE_SHARED_MODULE_SUFFIX}\")
+		file(GLOB kst_plugins \"${CMAKE_BINARY_DIR}/bin/${contents_dir}/plugins/*${CMAKE_SHARED_MODULE_SUFFIX}\")
 		set(libs \${qt_plugins_disbaled} \${kst_plugins})
 		include(BundleUtilities) 
-		fixup_bundle(\"${bapp}\" \"\${libs}\" \"${bdir}\") "
+		fixup_bundle(\"${app}\" \"\${libs}\" \"${bdir}\") "
 		COMPONENT RUNTIME)
 		
-	set(CPACK_BINARY_DRAGNDROP ON CACHE STRNG "" FORCE)
-	set(CPACK_BINARY_PACKAGEMAKER OFF CACHE STRNG "" FORCE)
-	set(CPACK_BINARY_STGZ OFF CACHE STRNG "" FORCE)
-	set(CPACK_BINARY_TBZ2 OFF CACHE STRNG "" FORCE)
-	set(CPACK_BINARY_TGZ OFF CACHE STRNG "" FORCE)
-	set(CPACK_STRIP_FILES OFF CACHE STRNG "" FORCE) 
+	#set(CPACK_STRIP_FILES OFF CACHE STRNG "" FORCE) 
+	set(CPACK_GENERATOR DragNDrop)
 
 endif()
 
--- branches/work/kst/portto4/kst/cmake/modules/KstMacros.cmake #1220050:1220051
@@ -119,7 +119,7 @@
 		if(NOT ${type} STREQUAL "STATIC")
 			install(TARGETS ${kst_name} RUNTIME DESTINATION bin)
 		endif()
-	else()
+	elseif(NOT APPLE)
 		install(TARGETS ${kst_name} DESTINATION lib)
 	endif()
 endmacro()
@@ -127,7 +127,11 @@
 
 macro(kst_init_plugin dir)
 	set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins)
+	if(APPLE)
+	    set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/${kst_binary_name}.app/Contents/plugins)
+	else()
 	set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/plugins)
+	endif()
 	include_directories(${CMAKE_BINARY_DIR}/${dir})
 	kst_include_directories(kstcore kstmath kstwidgets)
 	set(kst_plugin_dir ${dir})
@@ -145,8 +149,10 @@
 	kst_files_find(${kst_plugin_dir}/${folder}/${name})
 	add_library(${kst_name} MODULE ${kst_${kst_name}_sources} ${kst_${kst_name}_headers})
 	kst_link(kstcore kstmath kstwidgets)
+	if(NOT APPLE)
 	install(TARGETS ${kst_name} LIBRARY DESTINATION plugins)
 	kst_find_install_desktop_file(${kst_plugin_dir}/${folder}/${name})
+	endif()
 	add_dependencies(${kst_binary_name} ${kst_name})
 	kst_flat_source_group(${kst_${kst_name}_headers} ${kst_${kst_name}_sources_not_generated})
 	if(kst_verbose)


More information about the Kst mailing list