incubator-celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From abroekh...@apache.org
Subject svn commit: r1417376 - in /incubator/celix/trunk: ./ cmake/ deployment_admin/ device_access/ device_access/example/ examples/ examples/osgi-in-action/chapter04-paint-example/ remote_services/
Date Wed, 05 Dec 2012 12:02:25 GMT
Author: abroekhuis
Date: Wed Dec  5 12:02:23 2012
New Revision: 1417376

URL: http://svn.apache.org/viewvc?rev=1417376&view=rev
Log:
CELIX-43: Updated bundle creation and deployment

Added:
    incubator/celix/trunk/deployment_admin/deploy.cmake
      - copied, changed from r1417375, incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt
    incubator/celix/trunk/device_access/deploy.cmake
      - copied, changed from r1417375, incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt
    incubator/celix/trunk/examples/deploy.cmake
      - copied, changed from r1417375, incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt
    incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/deploy.cmake
      - copied, changed from r1417375, incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt
    incubator/celix/trunk/remote_services/deploy.cmake
      - copied, changed from r1417375, incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt
Modified:
    incubator/celix/trunk/CMakeLists.txt
    incubator/celix/trunk/cmake/Dependencies.cmake
    incubator/celix/trunk/cmake/Packaging.cmake
    incubator/celix/trunk/deployment_admin/CMakeLists.txt
    incubator/celix/trunk/device_access/example/CMakeLists.txt
    incubator/celix/trunk/examples/CMakeLists.txt
    incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt
    incubator/celix/trunk/remote_services/CMakeLists.txt

Modified: incubator/celix/trunk/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/CMakeLists.txt?rev=1417376&r1=1417375&r2=1417376&view=diff
==============================================================================
--- incubator/celix/trunk/CMakeLists.txt (original)
+++ incubator/celix/trunk/CMakeLists.txt Wed Dec  5 12:02:23 2012
@@ -53,4 +53,4 @@ add_subdirectory(launcher)
 add_subdirectory(framework)
 add_subdirectory(utils)
 
-deploy("hello_world" BUNDLES shell shell_tui hello_world log_service)
+deploy_targets()

Modified: incubator/celix/trunk/cmake/Dependencies.cmake
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/cmake/Dependencies.cmake?rev=1417376&r1=1417375&r2=1417376&view=diff
==============================================================================
--- incubator/celix/trunk/cmake/Dependencies.cmake (original)
+++ incubator/celix/trunk/cmake/Dependencies.cmake Wed Dec  5 12:02:23 2012
@@ -33,7 +33,8 @@ MACRO(celix_subproject)
     
     IF (${NAME} OR ${BUILD})
         set(${OPTION_NAME} "ON")
-    
+    	set_property(GLOBAL PROPERTY ${NAME}_INTERNAL "ON")
+    	
         FOREACH (DEP ${OPTION_DEPS})
             string(TOUPPER ${DEP} UC_DEP)
             set(DEP_NAME "BUILD_${UC_DEP}")
@@ -42,4 +43,20 @@ MACRO(celix_subproject)
     ELSE (${NAME} OR ${BUILD})
         set(${OPTION_NAME} "OFF")
     ENDIF (${NAME} OR ${BUILD})
-ENDMACRO(celix_subproject)
\ No newline at end of file
+ENDMACRO(celix_subproject)
+
+MACRO(is_enabled name)
+	string(TOUPPER ${name} UC_NAME)
+    set(NAME "BUILD_${UC_NAME}")
+    
+    get_property(BUILD GLOBAL PROPERTY ${NAME}_INTERNAL)
+    if (NOT DEFINED BUILD)
+        set(BUILD "OFF")
+    endif (NOT DEFINED BUILD)
+    
+    IF (${BUILD})
+        set(${name} "ON")
+    ELSE (${BUILD})
+        set(${name} "OFF")
+    ENDIF (${BUILD})
+ENDMACRO(is_enabled)
\ No newline at end of file

Modified: incubator/celix/trunk/cmake/Packaging.cmake
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/cmake/Packaging.cmake?rev=1417376&r1=1417375&r2=1417376&view=diff
==============================================================================
--- incubator/celix/trunk/cmake/Packaging.cmake (original)
+++ incubator/celix/trunk/cmake/Packaging.cmake Wed Dec  5 12:02:23 2012
@@ -129,7 +129,7 @@ ADD_CUSTOM_TARGET(deploy)
 MACRO(deploy)
     PARSE_ARGUMENTS(DEPLOY "BUNDLES" "" ${ARGN})
     LIST(GET DEPLOY_DEFAULT_ARGS 0 DEPLOY_NAME)
-	
+    
 	SET(DEPLOY_COMPONENT deploy_${DEPLOY_NAME})
 	SET(__deployTarget deploy_${DEPLOY_NAME})
 		
@@ -185,6 +185,20 @@ MACRO(deploy)
 	CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/cmake/RunConfig.in ${CMAKE_CURRENT_BINARY_DIR}/deploy/${DEPLOY_NAME}/${DEPLOY_NAME}.launch
@ONLY)
 ENDMACRO(deploy)
 
+# macro for scanning subdirectories for deploy.cmake files
+# these files contain the deployment of targets
+MACRO(deploy_targets)
+    FILE(GLOB_RECURSE new_list deploy.cmake)
+    SET(dir_list "")
+    FOREACH(file_path ${new_list})
+        SET(dir_list ${dir_list} ${file_path})
+    ENDFOREACH()
+    LIST(REMOVE_DUPLICATES dir_list)
+    FOREACH(file_path ${dir_list})
+		include(${file_path})
+	ENDFOREACH()
+ENDMACRO()
+
 MACRO(PARSE_ARGUMENTS prefix arg_names option_names)
   SET(DEFAULT_ARGS)
   FOREACH(arg_name ${arg_names})    

Modified: incubator/celix/trunk/deployment_admin/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/deployment_admin/CMakeLists.txt?rev=1417376&r1=1417375&r2=1417376&view=diff
==============================================================================
--- incubator/celix/trunk/deployment_admin/CMakeLists.txt (original)
+++ incubator/celix/trunk/deployment_admin/CMakeLists.txt Wed Dec  5 12:02:23 2012
@@ -47,6 +47,4 @@ if (DEPLOYMENT_ADMIN)
     target_link_libraries(deployment_admin celix_framework ${CURL_LIBRARIES})
     
     install(FILES public/include/resource_processor.h DESTINATION include/celix/deployment_admin)
-    
-    # deploy("deployment-admin" BUNDLES deployment_admin shell shell_tui log_service log_writer)
 endif (DEPLOYMENT_ADMIN)

Copied: incubator/celix/trunk/deployment_admin/deploy.cmake (from r1417375, incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt)
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/deployment_admin/deploy.cmake?p2=incubator/celix/trunk/deployment_admin/deploy.cmake&p1=incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt&r1=1417375&r2=1417376&rev=1417376&view=diff
==============================================================================
--- incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt (original)
+++ incubator/celix/trunk/deployment_admin/deploy.cmake Wed Dec  5 12:02:23 2012
@@ -14,15 +14,7 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-
-find_package(PkgConfig)
-if(PKG_CONFIG_EXECUTABLE)
-	add_subdirectory(circle)
-	add_subdirectory(paint)
-	add_subdirectory(square)
-	add_subdirectory(triangle)
-	
-	#deploy("chapter04-paint-example" BUNDLES chapter04-paint-example circle square triangle
shell shell_tui log_service log_writer)
-else(PKG_CONFIG_EXECUTABLE)
-	MESSAGE("No GTK found, not building the Paint Example")	
-endif(PKG_CONFIG_EXECUTABLE)
\ No newline at end of file
+is_enabled(DEPLOYMENT_ADMIN)
+if (DEPLOYMENT_ADMIN)
+	deploy("deployment-admin" BUNDLES deployment_admin shell shell_tui log_service log_writer)
+endif (DEPLOYMENT_ADMIN)
\ No newline at end of file

Copied: incubator/celix/trunk/device_access/deploy.cmake (from r1417375, incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt)
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/device_access/deploy.cmake?p2=incubator/celix/trunk/device_access/deploy.cmake&p1=incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt&r1=1417375&r2=1417376&rev=1417376&view=diff
==============================================================================
--- incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt (original)
+++ incubator/celix/trunk/device_access/deploy.cmake Wed Dec  5 12:02:23 2012
@@ -14,15 +14,7 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-
-find_package(PkgConfig)
-if(PKG_CONFIG_EXECUTABLE)
-	add_subdirectory(circle)
-	add_subdirectory(paint)
-	add_subdirectory(square)
-	add_subdirectory(triangle)
-	
-	#deploy("chapter04-paint-example" BUNDLES chapter04-paint-example circle square triangle
shell shell_tui log_service log_writer)
-else(PKG_CONFIG_EXECUTABLE)
-	MESSAGE("No GTK found, not building the Paint Example")	
-endif(PKG_CONFIG_EXECUTABLE)
\ No newline at end of file
+is_enabled(DEVICE_ACCESS_EXAMPLE)
+if(DEVICE_ACCESS_EXAMPLE)
+	deploy("device_access_example" BUNDLES device_manager driver_locator shell shell_tui log_service
base_driver base_driver word_consumingdriver char_refiningdriver)
+endif(DEVICE_ACCESS_EXAMPLE)
\ No newline at end of file

Modified: incubator/celix/trunk/device_access/example/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/device_access/example/CMakeLists.txt?rev=1417376&r1=1417375&r2=1417376&view=diff
==============================================================================
--- incubator/celix/trunk/device_access/example/CMakeLists.txt (original)
+++ incubator/celix/trunk/device_access/example/CMakeLists.txt Wed Dec  5 12:02:23 2012
@@ -17,10 +17,7 @@
 
 celix_subproject(DEVICE_ACCESS_EXAMPLE "Option to enable building the Device Access example
bundles" OFF DEPS LAUNCHER LOG_SERVICE SHELL shell_tui)
 if(DEVICE_ACCESS_EXAMPLE)
-
 	add_subdirectory(base_driver)
 	add_subdirectory(consuming_driver)
 	add_subdirectory(refining_driver)
-	
-	# deploy("device_access_example" BUNDLES device_manager driver_locator shell shell_tui log_service
base_driver base_driver word_consumingdriver char_refiningdriver)
 endif(DEVICE_ACCESS_EXAMPLE)
\ No newline at end of file

Modified: incubator/celix/trunk/examples/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/examples/CMakeLists.txt?rev=1417376&r1=1417375&r2=1417376&view=diff
==============================================================================
--- incubator/celix/trunk/examples/CMakeLists.txt (original)
+++ incubator/celix/trunk/examples/CMakeLists.txt Wed Dec  5 12:02:23 2012
@@ -26,12 +26,4 @@ if (EXAMPLES)
     add_subdirectory(osgi-in-action/chapter04-correct-listener)
     add_subdirectory(osgi-in-action/chapter01-greeting-example)
     add_subdirectory(osgi-in-action/chapter04-paint-example)
-    
-    #deploy(chapter01-greeting-example BUNDLES shell shell_tui log_service chapter01-greeting-example-client
chapter01-greeting-example)
-    #deploy(chapter04-correct-listener BUNDLES shell shell_tui log_service chapter04-correct-listener)
-    
-    #deploy("hello_world" BUNDLES shell shell_tui hello_world log_service)
-    #deploy("wb" BUNDLES tracker publisherA publisherB shell shell_tui log_service log_writer)
-    #deploy("wb_dp" BUNDLES tracker_depman publisherA publisherB shell shell_tui log_service
log_writer)
-    #deploy("echo" BUNDLES echo_server echo_client shell shell_tui log_service log_writer)
 endif(EXAMPLES)

Copied: incubator/celix/trunk/examples/deploy.cmake (from r1417375, incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt)
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/examples/deploy.cmake?p2=incubator/celix/trunk/examples/deploy.cmake&p1=incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt&r1=1417375&r2=1417376&rev=1417376&view=diff
==============================================================================
--- incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt (original)
+++ incubator/celix/trunk/examples/deploy.cmake Wed Dec  5 12:02:23 2012
@@ -14,15 +14,13 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-
-find_package(PkgConfig)
-if(PKG_CONFIG_EXECUTABLE)
-	add_subdirectory(circle)
-	add_subdirectory(paint)
-	add_subdirectory(square)
-	add_subdirectory(triangle)
+is_enabled(EXAMPLES)
+if (EXAMPLES)
+	deploy(chapter01-greeting-example BUNDLES shell shell_tui log_service chapter01-greeting-example-client
chapter01-greeting-example)
+	deploy(chapter04-correct-listener BUNDLES shell shell_tui log_service chapter04-correct-listener)
 	
-	#deploy("chapter04-paint-example" BUNDLES chapter04-paint-example circle square triangle
shell shell_tui log_service log_writer)
-else(PKG_CONFIG_EXECUTABLE)
-	MESSAGE("No GTK found, not building the Paint Example")	
-endif(PKG_CONFIG_EXECUTABLE)
\ No newline at end of file
+	deploy("hello_world" BUNDLES shell shell_tui hello_world log_service)
+	deploy("wb" BUNDLES tracker publisherA publisherB shell shell_tui log_service log_writer)
+	deploy("wb_dp" BUNDLES tracker_depman publisherA publisherB shell shell_tui log_service
log_writer)
+	deploy("echo" BUNDLES echo_server echo_client shell shell_tui log_service log_writer)
+endif (EXAMPLES)
\ No newline at end of file

Modified: incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt?rev=1417376&r1=1417375&r2=1417376&view=diff
==============================================================================
--- incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt (original)
+++ incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt Wed
Dec  5 12:02:23 2012
@@ -21,8 +21,6 @@ if(PKG_CONFIG_EXECUTABLE)
 	add_subdirectory(paint)
 	add_subdirectory(square)
 	add_subdirectory(triangle)
-	
-	#deploy("chapter04-paint-example" BUNDLES chapter04-paint-example circle square triangle
shell shell_tui log_service log_writer)
 else(PKG_CONFIG_EXECUTABLE)
 	MESSAGE("No GTK found, not building the Paint Example")	
 endif(PKG_CONFIG_EXECUTABLE)
\ No newline at end of file

Copied: incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/deploy.cmake
(from r1417375, incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt)
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/deploy.cmake?p2=incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/deploy.cmake&p1=incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt&r1=1417375&r2=1417376&rev=1417376&view=diff
==============================================================================
--- incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt (original)
+++ incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/deploy.cmake Wed
Dec  5 12:02:23 2012
@@ -14,15 +14,6 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-
-find_package(PkgConfig)
 if(PKG_CONFIG_EXECUTABLE)
-	add_subdirectory(circle)
-	add_subdirectory(paint)
-	add_subdirectory(square)
-	add_subdirectory(triangle)
-	
-	#deploy("chapter04-paint-example" BUNDLES chapter04-paint-example circle square triangle
shell shell_tui log_service log_writer)
-else(PKG_CONFIG_EXECUTABLE)
-	MESSAGE("No GTK found, not building the Paint Example")	
+	deploy("chapter04-paint-example" BUNDLES chapter04-paint-example circle square triangle
shell shell_tui log_service log_writer)
 endif(PKG_CONFIG_EXECUTABLE)
\ No newline at end of file

Modified: incubator/celix/trunk/remote_services/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/remote_services/CMakeLists.txt?rev=1417376&r1=1417375&r2=1417376&view=diff
==============================================================================
--- incubator/celix/trunk/remote_services/CMakeLists.txt (original)
+++ incubator/celix/trunk/remote_services/CMakeLists.txt Wed Dec  5 12:02:23 2012
@@ -39,7 +39,4 @@ if (REMOTE_SERVICE_ADMIN)
     add_subdirectory(example_endpoint)
     add_subdirectory(example_proxy)
     add_subdirectory(calc_shell)
-    
-    #deploy("remote-services" BUNDLES discovery topology_manager remote_service_admin example
shell shell_tui log_service log_writer)
-    #deploy("remote-services-client" BUNDLES discovery topology_manager remote_service_admin
shell shell_tui log_service log_writer calc_shell)
 endif (REMOTE_SERVICE_ADMIN)

Copied: incubator/celix/trunk/remote_services/deploy.cmake (from r1417375, incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt)
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/remote_services/deploy.cmake?p2=incubator/celix/trunk/remote_services/deploy.cmake&p1=incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt&r1=1417375&r2=1417376&rev=1417376&view=diff
==============================================================================
--- incubator/celix/trunk/examples/osgi-in-action/chapter04-paint-example/CMakeLists.txt (original)
+++ incubator/celix/trunk/remote_services/deploy.cmake Wed Dec  5 12:02:23 2012
@@ -14,15 +14,8 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-
-find_package(PkgConfig)
-if(PKG_CONFIG_EXECUTABLE)
-	add_subdirectory(circle)
-	add_subdirectory(paint)
-	add_subdirectory(square)
-	add_subdirectory(triangle)
-	
-	#deploy("chapter04-paint-example" BUNDLES chapter04-paint-example circle square triangle
shell shell_tui log_service log_writer)
-else(PKG_CONFIG_EXECUTABLE)
-	MESSAGE("No GTK found, not building the Paint Example")	
-endif(PKG_CONFIG_EXECUTABLE)
\ No newline at end of file
+is_enabled(REMOTE_SERVICE_ADMIN)
+if (REMOTE_SERVICE_ADMIN)
+	deploy("remote-services" BUNDLES discovery topology_manager remote_service_admin example
shell shell_tui log_service log_writer)
+	deploy("remote-services-client" BUNDLES discovery topology_manager remote_service_admin
shell shell_tui log_service log_writer calc_shell)
+endif (REMOTE_SERVICE_ADMIN)
\ No newline at end of file



Mime
View raw message