You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by ab...@apache.org on 2012/11/15 14:49:15 UTC

svn commit: r1409777 - in /incubator/celix/trunk: CMakeLists.txt cmake/Packaging.cmake cmake/manifest.in log_service/CMakeLists.txt

Author: abroekhuis
Date: Thu Nov 15 13:49:12 2012
New Revision: 1409777

URL: http://svn.apache.org/viewvc?rev=1409777&view=rev
Log:
Initial support for generating manifest files

Added:
    incubator/celix/trunk/cmake/manifest.in
Modified:
    incubator/celix/trunk/CMakeLists.txt
    incubator/celix/trunk/cmake/Packaging.cmake
    incubator/celix/trunk/log_service/CMakeLists.txt

Modified: incubator/celix/trunk/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/CMakeLists.txt?rev=1409777&r1=1409776&r2=1409777&view=diff
==============================================================================
--- incubator/celix/trunk/CMakeLists.txt (original)
+++ incubator/celix/trunk/CMakeLists.txt Thu Nov 15 13:49:12 2012
@@ -33,6 +33,8 @@ include(cmake/installation.cmake)
 
 include(UseDoxygen)  
 
+set(DEFAULT_VERSION 0.0.1-incubation)
+
 ## New sub project must use a buildoption to be able to enable/disable the project using the CMake Editor
 ## Sub projects depending on another sub project automatically enable these dependencies
 ## For this to work, the order off "add_subdirectory" has to be correct (ie backwards)

Modified: incubator/celix/trunk/cmake/Packaging.cmake
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/cmake/Packaging.cmake?rev=1409777&r1=1409776&r2=1409777&view=diff
==============================================================================
--- incubator/celix/trunk/cmake/Packaging.cmake (original)
+++ incubator/celix/trunk/cmake/Packaging.cmake Thu Nov 15 13:49:12 2012
@@ -31,6 +31,24 @@ MACRO(bundle)
     LIST(GET BUNDLE_DEFAULT_ARGS 0 BUNDLE_NAME)
     
 	add_library(${BUNDLE_NAME} SHARED ${BUNDLE_SOURCES})
+	
+	if (NOT BUNDLE_SYMBOLICNAME)
+		set(BUNDLE_SYMBOLICNAME ${BUNDLE_NAME})
+	endif (NOT BUNDLE_SYMBOLICNAME)
+	if (NOT BUNDLE_VERSION)
+		set(VERSION ${DEFAULT_VERSION})
+	endif (NOT BUNDLE_VERSION)
+	if (BUNDLE_EXTRAHEADERS)
+	    set(BUNDLE_EXTRAHEADERS_STR)
+	    foreach(ITEM ${BUNDLE_EXTRAHEADERS})
+	      set(BUNDLE_EXTRAHEADERS_STR "${BUNDLE_EXTRAHEADERS_STR}\n${ITEM}")
+	    endforeach()
+	    string(STRIP ${BUNDLE_EXTRAHEADERS_STR} BUNDLE_EXTRAHEADERS_STR)
+	endif (BUNDLE_EXTRAHEADERS)
+	
+	SET(__bundleManifest ${CMAKE_CURRENT_BINARY_DIR}/MANIFEST_TEST.MF)
+    CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/cmake/manifest.in ${__bundleManifest} @ONLY)
+	install (FILES ${__bundleManifest} DESTINATION ./META-INF COMPONENT ${BUNDLE_NAME})
     
     install (DIRECTORY META-INF DESTINATION . COMPONENT ${BUNDLE_NAME} FILES_MATCHING PATTERN "*" PATTERN ".svn" EXCLUDE)
 	install (TARGETS ${BUNDLE_NAME} DESTINATION . COMPONENT ${BUNDLE_NAME})

Added: incubator/celix/trunk/cmake/manifest.in
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/cmake/manifest.in?rev=1409777&view=auto
==============================================================================
--- incubator/celix/trunk/cmake/manifest.in (added)
+++ incubator/celix/trunk/cmake/manifest.in Thu Nov 15 13:49:12 2012
@@ -0,0 +1,4 @@
+Bundle-SymbolicName: @BUNDLE_SYMBOLICNAME@
+Bundle-Version: @BUNDLE_VERSION@
+library: @BUNDLE_NAME@
+@BUNDLE_EXTRAHEADERS_STR@

Modified: incubator/celix/trunk/log_service/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/log_service/CMakeLists.txt?rev=1409777&r1=1409776&r2=1409777&view=diff
==============================================================================
--- incubator/celix/trunk/log_service/CMakeLists.txt (original)
+++ incubator/celix/trunk/log_service/CMakeLists.txt Thu Nov 15 13:49:12 2012
@@ -17,6 +17,9 @@
 
 celix_subproject(LOG_SERVICE "Option to enable building the Log Service bundles" "OFF" DEPS framework)
 if (LOG_SERVICE)
+	SET(BUNDLE_SYMBOLICNAME "Log Service")
+	SET(BUNDLE_VERSION 0.0.1-incubation)
+	SET(BUNDLE_EXTRAHEADERS "Test: TEST" "Bla: bla")
     bundle(log_service SOURCES
     	private/src/log
     	private/src/log_entry