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/06/24 17:16:20 UTC

svn commit: r1353283 - in /incubator/celix/trunk: ./ cmake/ dependency_manager/ deployment_admin/ device_access/ examples/ framework/ launcher/ log_service/ log_writer/ remote_services/ shell/ shell_tui/ utils/

Author: abroekhuis
Date: Sun Jun 24 15:16:18 2012
New Revision: 1353283

URL: http://svn.apache.org/viewvc?rev=1353283&view=rev
Log:
Project Structure

Updated the project dependencies to use a single macro for setting build options.
Dependencies are not set using build options, but using global variables. This makes it possible to disable sub project (and their dependencies).

Modified:
    incubator/celix/trunk/CMakeLists.txt
    incubator/celix/trunk/cmake/Dependencies.cmake
    incubator/celix/trunk/dependency_manager/CMakeLists.txt
    incubator/celix/trunk/deployment_admin/CMakeLists.txt
    incubator/celix/trunk/device_access/CMakeLists.txt
    incubator/celix/trunk/examples/CMakeLists.txt
    incubator/celix/trunk/framework/CMakeLists.txt
    incubator/celix/trunk/launcher/CMakeLists.txt
    incubator/celix/trunk/log_service/CMakeLists.txt
    incubator/celix/trunk/log_writer/CMakeLists.txt
    incubator/celix/trunk/remote_services/CMakeLists.txt
    incubator/celix/trunk/shell/CMakeLists.txt
    incubator/celix/trunk/shell_tui/CMakeLists.txt
    incubator/celix/trunk/utils/CMakeLists.txt

Modified: incubator/celix/trunk/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/CMakeLists.txt?rev=1353283&r1=1353282&r2=1353283&view=diff
==============================================================================
--- incubator/celix/trunk/CMakeLists.txt (original)
+++ incubator/celix/trunk/CMakeLists.txt Sun Jun 24 15:16:18 2012
@@ -18,6 +18,8 @@
 cmake_minimum_required (VERSION 2.6)
 project (Celix C)
 
+cmake_policy(SET CMP0012 NEW)
+
 #SET(CMAKE_VERBOSE_MAKEFILE ON)
 
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/modules/")
@@ -43,11 +45,6 @@ ADD_CUSTOM_TARGET(install-fw
 
 include(cmake/Includes.cmake)  
 
-add_subdirectory(utils)
-add_subdirectory(framework)
-add_subdirectory(launcher)
-add_subdirectory(dependency_manager)
-
 ## 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)
@@ -59,4 +56,12 @@ add_subdirectory(shell_tui)
 add_subdirectory(shell)
 add_subdirectory(log_writer)
 add_subdirectory(log_service)
+
+add_subdirectory(dependency_manager)
+
+add_subdirectory(launcher)
+add_subdirectory(framework)
+add_subdirectory(utils)
+
+
 #enable_testing()

Modified: incubator/celix/trunk/cmake/Dependencies.cmake
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/cmake/Dependencies.cmake?rev=1353283&r1=1353282&r2=1353283&view=diff
==============================================================================
--- incubator/celix/trunk/cmake/Dependencies.cmake (original)
+++ incubator/celix/trunk/cmake/Dependencies.cmake Sun Jun 24 15:16:18 2012
@@ -1,10 +1,4 @@
-# dep_opt(name "descr" default DEPS a b c
-#option(BUILD_DEVICE_ACCESS "Option to enable building the Device Access Service bundles" OFF)
-#if(BUILD_DEVICE_ACCESS)
-#    get_property(log_doc CACHE BUILD_LOG_SERVICE PROPERTY HELPSTRING)
-#    set(BUILD_LOG_SERVICE "ON" CACHE BOOL "c" FORCE)
-
-MACRO(dep_opt)
+MACRO(celix_subproject)
     PARSE_ARGUMENTS(OPTION "DEPS" "" ${ARGN})
     LIST(GET OPTION_DEFAULT_ARGS 0 OPTION_NAME)
     LIST(GET OPTION_DEFAULT_ARGS 1 OPTION_DESCRIPTION)
@@ -15,12 +9,20 @@ MACRO(dep_opt)
     
     option(${NAME} "${OPTION_DESCRIPTION}" ${OPTION_DEFAULT})
     
-    IF (${NAME})
+    get_property(BUILD GLOBAL PROPERTY ${NAME}_INTERNAL)
+    if (NOT DEFINED BUILD)
+        set(BUILD "OFF")
+    endif (NOT DEFINED BUILD)
+    
+    IF (${NAME} OR ${BUILD})
+        set(${OPTION_NAME} "ON")
+    
         FOREACH (DEP ${OPTION_DEPS})
             string(TOUPPER ${DEP} UC_DEP)
             set(DEP_NAME "BUILD_${UC_DEP}")
-            get_property(doc_string CACHE ${DEP_NAME} PROPERTY HELPSTRING)
-            set(${DEP_NAME} "ON" CACHE BOOL "${doc_string}" FORCE)
+            set_property(GLOBAL PROPERTY ${DEP_NAME}_INTERNAL "ON")
         ENDFOREACH (DEP)
-    ENDIF (${NAME})
-ENDMACRO(dep_opt)
\ No newline at end of file
+    ELSE (${NAME} OR ${BUILD})
+        set(${OPTION_NAME} "OFF")
+    ENDIF (${NAME} OR ${BUILD})
+ENDMACRO(celix_subproject)
\ No newline at end of file

Modified: incubator/celix/trunk/dependency_manager/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/dependency_manager/CMakeLists.txt?rev=1353283&r1=1353282&r2=1353283&view=diff
==============================================================================
--- incubator/celix/trunk/dependency_manager/CMakeLists.txt (original)
+++ incubator/celix/trunk/dependency_manager/CMakeLists.txt Sun Jun 24 15:16:18 2012
@@ -15,22 +15,25 @@
 # specific language governing permissions and limitations
 # under the License.
 
-# Add -fPIC for x86_64 Unix platforms; this lib will be linked to a shared lib
-if(UNIX AND NOT WIN32)
-  find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin )
-  if(CMAKE_UNAME)
-    exec_program(uname ARGS -m OUTPUT_VARIABLE CMAKE_SYSTEM_PROCESSOR)
-    set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR} CACHE INTERNAL "processor type (i386 and x86_64)")
-     if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
-      add_definitions(-fPIC)
-    endif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
-  endif(CMAKE_UNAME)
-endif(UNIX AND NOT WIN32)
-
-add_library(dependency_manager STATIC dependency_manager.c dependency_activator_base.c service_component.c service_dependency.c)
-include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
-target_link_libraries(dependency_manager framework)
-
-FILE(GLOB files dependency_activator_base.h service.h dependency_manager.h service_component_private.h service_component.h service_dependency.h)
-INSTALL(FILES ${files} DESTINATION include/dependency_manager COMPONENT framework)
-install(TARGETS dependency_manager DESTINATION lib COMPONENT framework)
+celix_subproject(DEPENDENCY_MANAGER "Option to build the dependency manager static library" "OFF" DEPS framework)
+if (DEPENDENCY_MANAGER) 
+    # Add -fPIC for x86_64 Unix platforms; this lib will be linked to a shared lib
+    if(UNIX AND NOT WIN32)
+      find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin )
+      if(CMAKE_UNAME)
+        exec_program(uname ARGS -m OUTPUT_VARIABLE CMAKE_SYSTEM_PROCESSOR)
+        set(CMAKE_SYSTEM_PROCESSOR ${CMAKE_SYSTEM_PROCESSOR} CACHE INTERNAL "processor type (i386 and x86_64)")
+         if(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
+          add_definitions(-fPIC)
+        endif(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
+      endif(CMAKE_UNAME)
+    endif(UNIX AND NOT WIN32)
+    
+    add_library(dependency_manager STATIC dependency_manager.c dependency_activator_base.c service_component.c service_dependency.c)
+    include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
+    target_link_libraries(dependency_manager framework)
+    
+    FILE(GLOB files dependency_activator_base.h service.h dependency_manager.h service_component_private.h service_component.h service_dependency.h)
+    INSTALL(FILES ${files} DESTINATION include/dependency_manager COMPONENT framework)
+    install(TARGETS dependency_manager DESTINATION lib COMPONENT framework)
+endif (DEPENDENCY_MANAGER)

Modified: incubator/celix/trunk/deployment_admin/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/deployment_admin/CMakeLists.txt?rev=1353283&r1=1353282&r2=1353283&view=diff
==============================================================================
--- incubator/celix/trunk/deployment_admin/CMakeLists.txt (original)
+++ incubator/celix/trunk/deployment_admin/CMakeLists.txt Sun Jun 24 15:16:18 2012
@@ -14,8 +14,8 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-dep_opt(DEPLOYMENT_ADMIN "Option to enable building the Deployment Admin Service bundles" OFF DEPS shell_tui log_writer)
-if (BUILD_DEPLOYMENT_ADMIN)
+celix_subproject(DEPLOYMENT_ADMIN "Option to enable building the Deployment Admin Service bundles" OFF DEPS framework launcher shell_tui log_writer)
+if (DEPLOYMENT_ADMIN)
     add_definitions(-DUSE_FILE32API)
     
     include_directories("/opt/local/include")
@@ -38,4 +38,4 @@ if (BUILD_DEPLOYMENT_ADMIN)
     target_link_libraries(deployment_admin framework curl)
     
     deploy("deployment-admin" BUNDLES deployment_admin shell shell_tui log_service log_writer)
-endif (BUILD_DEPLOYMENT_ADMIN)
+endif (DEPLOYMENT_ADMIN)

Modified: incubator/celix/trunk/device_access/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/device_access/CMakeLists.txt?rev=1353283&r1=1353282&r2=1353283&view=diff
==============================================================================
--- incubator/celix/trunk/device_access/CMakeLists.txt (original)
+++ incubator/celix/trunk/device_access/CMakeLists.txt Sun Jun 24 15:16:18 2012
@@ -14,12 +14,12 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-dep_opt(DEVICE_ACCESS "Option to enable building the Device Access Service bundles" OFF DEPS LOG_SERVICE SHELL shell_tui)
-if(BUILD_DEVICE_ACCESS)
+celix_subproject(DEVICE_ACCESS "Option to enable building the Device Access Service bundles" OFF DEPS LAUNCHER LOG_SERVICE SHELL shell_tui)
+if(DEVICE_ACCESS)
     add_subdirectory(device_access)
     add_subdirectory(driver_locator)
     
     add_subdirectory(example)
     
     deploy("device_access_example" BUNDLES device_manager driver_locator shell shell_tui log_service base_driver)
-endif(BUILD_DEVICE_ACCESS)
+endif(DEVICE_ACCESS)

Modified: incubator/celix/trunk/examples/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/examples/CMakeLists.txt?rev=1353283&r1=1353282&r2=1353283&view=diff
==============================================================================
--- incubator/celix/trunk/examples/CMakeLists.txt (original)
+++ incubator/celix/trunk/examples/CMakeLists.txt Sun Jun 24 15:16:18 2012
@@ -14,8 +14,8 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-dep_opt(EXAMPLES "Option to enable building the Examples" "OFF" DEPS SHELL_TUI)
-if (BUILD_EXAMPLES)
+celix_subproject(EXAMPLES "Option to enable building the Examples" "OFF" DEPS FRAMEWORK LAUNCHER SHELL_TUI)
+if (EXAMPLES)
     add_subdirectory(hello_world)
     add_subdirectory(mongoose)
     
@@ -38,4 +38,4 @@ if (BUILD_EXAMPLES)
     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)
     include(target.cmake)
-endif(BUILD_EXAMPLES)
+endif(EXAMPLES)

Modified: incubator/celix/trunk/framework/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/framework/CMakeLists.txt?rev=1353283&r1=1353282&r2=1353283&view=diff
==============================================================================
--- incubator/celix/trunk/framework/CMakeLists.txt (original)
+++ incubator/celix/trunk/framework/CMakeLists.txt Sun Jun 24 15:16:18 2012
@@ -14,34 +14,37 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-cmake_minimum_required(VERSION 2.6)
-
-include(FindZLIB)
-IF(ZLIB_FOUND)
-	MESSAGE(STATUS "Looking for ZLIB - found")
-ELSE(ZLIB_FOUND)
-	MESSAGE(FATAL_ERROR "Looking for ZLIB - not found")
-ENDIF(ZLIB_FOUND)
-
-include(FindCURL)
-IF(CURL_FOUND)
-	MESSAGE(STATUS "Looking for CURL - found")
-ELSE(CURL_FOUND)
-	MESSAGE(FATAL_ERROR "Looking for CURL - not found")
-ENDIF(CURL_FOUND)
-
-include(UseDoxygen)
-
-add_definitions(-DUSE_FILE32API)
-aux_source_directory("private/src" SRC)
-#include_directories(${CURL_INCLUDE_DIR})
-include_directories(${ZLIB_INCLUDE_DIR})
-include_directories("private/include")
-include_directories("public/include")
-include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
-add_library(framework SHARED ${SRC})
-target_link_libraries(framework utils ${ZLIB_LIBRARY} ${APR_LIBRARY})
-
-install(TARGETS framework DESTINATION lib COMPONENT framework)
-FILE(GLOB files "public/include/*.h")
-INSTALL(FILES ${files} DESTINATION include COMPONENT framework)
+celix_subproject(FRAMEWORK "Option to build the framework shared library" "ON" DEPS UTILS)
+if (FRAMEWORK) 
+    cmake_minimum_required(VERSION 2.6)
+    
+    include(FindZLIB)
+    IF(ZLIB_FOUND)
+    	MESSAGE(STATUS "Looking for ZLIB - found")
+    ELSE(ZLIB_FOUND)
+    	MESSAGE(FATAL_ERROR "Looking for ZLIB - not found")
+    ENDIF(ZLIB_FOUND)
+    
+    include(FindCURL)
+    IF(CURL_FOUND)
+    	MESSAGE(STATUS "Looking for CURL - found")
+    ELSE(CURL_FOUND)
+    	MESSAGE(FATAL_ERROR "Looking for CURL - not found")
+    ENDIF(CURL_FOUND)
+    
+    include(UseDoxygen)
+    
+    add_definitions(-DUSE_FILE32API)
+    aux_source_directory("private/src" SRC)
+    #include_directories(${CURL_INCLUDE_DIR})
+    include_directories(${ZLIB_INCLUDE_DIR})
+    include_directories("private/include")
+    include_directories("public/include")
+    include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
+    add_library(framework SHARED ${SRC})
+    target_link_libraries(framework utils ${ZLIB_LIBRARY} ${APR_LIBRARY})
+    
+    install(TARGETS framework DESTINATION lib COMPONENT framework)
+    FILE(GLOB files "public/include/*.h")
+    INSTALL(FILES ${files} DESTINATION include COMPONENT framework)
+endif (FRAMEWORK)

Modified: incubator/celix/trunk/launcher/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/launcher/CMakeLists.txt?rev=1353283&r1=1353282&r2=1353283&view=diff
==============================================================================
--- incubator/celix/trunk/launcher/CMakeLists.txt (original)
+++ incubator/celix/trunk/launcher/CMakeLists.txt Sun Jun 24 15:16:18 2012
@@ -14,11 +14,13 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-
-add_executable(launcher launcher.c)
-
-target_link_libraries(launcher framework)
-include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/framework/private/include")
-
-install(TARGETS launcher RUNTIME DESTINATION bin COMPONENT framework)
\ No newline at end of file
+celix_subproject(LAUNCHER "Option to build the launcher" "ON" DEPS UTILS FRAMEWORK)
+if (LAUNCHER) 
+    add_executable(launcher launcher.c)
+    
+    target_link_libraries(launcher framework)
+    include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
+    include_directories("${PROJECT_SOURCE_DIR}/framework/private/include")
+    
+    install(TARGETS launcher RUNTIME DESTINATION bin COMPONENT framework)
+endif (LAUNCHER) 
\ No newline at end of file

Modified: incubator/celix/trunk/log_service/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/log_service/CMakeLists.txt?rev=1353283&r1=1353282&r2=1353283&view=diff
==============================================================================
--- incubator/celix/trunk/log_service/CMakeLists.txt (original)
+++ incubator/celix/trunk/log_service/CMakeLists.txt Sun Jun 24 15:16:18 2012
@@ -14,8 +14,8 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-dep_opt(LOG_SERVICE "Option to enable building the Log Service bundles" "OFF")
-if(BUILD_LOG_SERVICE)
+celix_subproject(LOG_SERVICE "Option to enable building the Log Service bundles" "OFF" DEPS framework)
+if (LOG_SERVICE)
     bundle(log_service SOURCES
     	private/src/log
     	private/src/log_entry
@@ -34,4 +34,4 @@ if(BUILD_LOG_SERVICE)
     FILE(GLOB files public/include/log_service.h)
     INSTALL(FILES ${files} DESTINATION include/log_service COMPONENT framework)
     INSTALL(FILES ${PROJECT_BINARY_DIR}/bundles/log_service.zip DESTINATION bundles COMPONENT framework)
-endif(BUILD_LOG_SERVICE)
\ No newline at end of file
+endif (LOG_SERVICE)

Modified: incubator/celix/trunk/log_writer/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/log_writer/CMakeLists.txt?rev=1353283&r1=1353282&r2=1353283&view=diff
==============================================================================
--- incubator/celix/trunk/log_writer/CMakeLists.txt (original)
+++ incubator/celix/trunk/log_writer/CMakeLists.txt Sun Jun 24 15:16:18 2012
@@ -14,8 +14,8 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-dep_opt(LOG_WRITER "Option to enable building the Log Writer bundle" "OFF" DEPS LOG_SERVICE)
-if (BUILD_LOG_WRITER)
+celix_subproject(LOG_WRITER "Option to enable building the Log Writer bundle" "OFF" DEPS FRAMEWORK LOG_SERVICE DEPENDENCY_MANAGER)
+if (LOG_WRITER)
     bundle(log_writer SOURCES dependency_activator log_writer)
     include_directories("${PROJECT_SOURCE_DIR}/celix")
     include_directories("${PROJECT_SOURCE_DIR}/dependency_manager")
@@ -24,4 +24,4 @@ if (BUILD_LOG_WRITER)
     target_link_libraries(log_writer framework dependency_manager)
     
     INSTALL(FILES ${PROJECT_BINARY_DIR}/bundles/log_writer.zip DESTINATION bundles COMPONENT framework)
-endif (BUILD_LOG_WRITER)
\ No newline at end of file
+endif (LOG_WRITER)
\ 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=1353283&r1=1353282&r2=1353283&view=diff
==============================================================================
--- incubator/celix/trunk/remote_services/CMakeLists.txt (original)
+++ incubator/celix/trunk/remote_services/CMakeLists.txt Sun Jun 24 15:16:18 2012
@@ -14,9 +14,8 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-dep_opt(REMOTE_SERVICE_ADMIN "Option to enable building the Remote Service Admin Service bundles" OFF DEPS shell_tui log_writer)
-if (BUILD_REMOTE_SERVICE_ADMIN)
-
+celix_subproject(REMOTE_SERVICE_ADMIN "Option to enable building the Remote Service Admin Service bundles" OFF DEPS LAUNCHER shell_tui log_writer)
+if (REMOTE_SERVICE_ADMIN)
     # Add -fPIC for x86_64 Unix platforms; this lib will be linked to a shared lib
     if(UNIX AND NOT WIN32)
       find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin )
@@ -42,4 +41,4 @@ if (BUILD_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 (BUILD_REMOTE_SERVICE_ADMIN)
+endif (REMOTE_SERVICE_ADMIN)

Modified: incubator/celix/trunk/shell/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/shell/CMakeLists.txt?rev=1353283&r1=1353282&r2=1353283&view=diff
==============================================================================
--- incubator/celix/trunk/shell/CMakeLists.txt (original)
+++ incubator/celix/trunk/shell/CMakeLists.txt Sun Jun 24 15:16:18 2012
@@ -14,8 +14,8 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-dep_opt(SHELL "Option to enable building the Shell bundles" "OFF" DEPS LOG_SERVICE)
-if (BUILD_SHELL)
+celix_subproject(SHELL "Option to enable building the Shell bundles" "OFF" DEPS LAUNCHER LOG_SERVICE)
+if (SHELL)
     bundle(shell SOURCES shell command
     	ps_command start_command stop_command
     	install_command update_command
@@ -30,4 +30,4 @@ if (BUILD_SHELL)
     FILE(GLOB files shell.h command.h)
     INSTALL(FILES ${files} DESTINATION include/shell COMPONENT framework)
     INSTALL(FILES ${PROJECT_BINARY_DIR}/bundles/shell.zip DESTINATION bundles COMPONENT framework)
-endif (BUILD_SHELL)
\ No newline at end of file
+endif (SHELL)
\ No newline at end of file

Modified: incubator/celix/trunk/shell_tui/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/shell_tui/CMakeLists.txt?rev=1353283&r1=1353282&r2=1353283&view=diff
==============================================================================
--- incubator/celix/trunk/shell_tui/CMakeLists.txt (original)
+++ incubator/celix/trunk/shell_tui/CMakeLists.txt Sun Jun 24 15:16:18 2012
@@ -14,8 +14,8 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-dep_opt(SHELL_TUI "Option to enable building the Shell Textual User Interface bundles" OFF DEPS SHELL)
-if (BUILD_SHELL_TUI)
+celix_subproject(SHELL_TUI "Option to enable building the Shell Textual User Interface bundles" OFF DEPS LAUNCHER SHELL)
+if (SHELL_TUI)
     bundle(shell_tui SOURCES shell_tui)
     include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
     include_directories("${PROJECT_SOURCE_DIR}/shell")
@@ -24,4 +24,4 @@ if (BUILD_SHELL_TUI)
     package(shell_tui)
     
     INSTALL(FILES ${PROJECT_BINARY_DIR}/bundles/shell_tui.zip DESTINATION bundles COMPONENT framework)
-endif (BUILD_SHELL_TUI)
\ No newline at end of file
+endif (SHELL_TUI)
\ No newline at end of file

Modified: incubator/celix/trunk/utils/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/utils/CMakeLists.txt?rev=1353283&r1=1353282&r2=1353283&view=diff
==============================================================================
--- incubator/celix/trunk/utils/CMakeLists.txt (original)
+++ incubator/celix/trunk/utils/CMakeLists.txt Sun Jun 24 15:16:18 2012
@@ -14,40 +14,43 @@
 # KIND, either express or implied.  See the License for the
 # specific language governing permissions and limitations
 # under the License.
-cmake_minimum_required(VERSION 2.6)
-
-add_definitions(-DUSE_FILE32API)
-aux_source_directory("private/src" SRC)
-include_directories("private/include")
-include_directories("public/include")
-add_library(utils SHARED ${SRC})
-
-IF(UNIX)
-	target_link_libraries(utils m)
-ENDIF(UNIX)
-target_link_libraries(utils ${APR_LIBRARY})
-
-install(TARGETS utils DESTINATION lib COMPONENT framework)
-FILE(GLOB files "public/include/*.h")
-INSTALL(FILES ${files} DESTINATION include COMPONENT framework)
-
-include_directories(${CUNIT_INCLUDE_DIRS})
-include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
-include_directories("${PROJECT_SOURCE_DIR}/utils/private/include")
-
-add_executable(hash_map_test private/test/hash_map_test.c)
-target_link_libraries(hash_map_test utils ${CUNIT_LIBRARIES})
-
-add_executable(hash_map_test_hash private/test/hash_map_test_hash.c)
-target_link_libraries(hash_map_test_hash utils ${CUNIT_LIBRARIES})
-
-add_executable(array_list_test private/test/array_list_test.c)
-target_link_libraries(array_list_test utils ${CUNIT_LIBRARIES})
-
-add_executable(linked_list_test private/test/linked_list_test.c)
-target_link_libraries(linked_list_test utils ${CUNIT_LIBRARIES})
-
-run_test(array_list_test)
-run_test(hash_map_test)
-run_test(hash_map_test_hash)
-run_test(linked_list_test)
+celix_subproject(UTILS "Option to build the utilities library" "ON")
+if (UTILS) 
+    cmake_minimum_required(VERSION 2.6)
+    
+    add_definitions(-DUSE_FILE32API)
+    aux_source_directory("private/src" SRC)
+    include_directories("private/include")
+    include_directories("public/include")
+    add_library(utils SHARED ${SRC})
+    
+    IF(UNIX)
+    	target_link_libraries(utils m)
+    ENDIF(UNIX)
+    target_link_libraries(utils ${APR_LIBRARY})
+    
+    install(TARGETS utils DESTINATION lib COMPONENT framework)
+    FILE(GLOB files "public/include/*.h")
+    INSTALL(FILES ${files} DESTINATION include COMPONENT framework)
+    
+    include_directories(${CUNIT_INCLUDE_DIRS})
+    include_directories("${PROJECT_SOURCE_DIR}/utils/public/include")
+    include_directories("${PROJECT_SOURCE_DIR}/utils/private/include")
+    
+    add_executable(hash_map_test private/test/hash_map_test.c)
+    target_link_libraries(hash_map_test utils ${CUNIT_LIBRARIES})
+    
+    add_executable(hash_map_test_hash private/test/hash_map_test_hash.c)
+    target_link_libraries(hash_map_test_hash utils ${CUNIT_LIBRARIES})
+    
+    add_executable(array_list_test private/test/array_list_test.c)
+    target_link_libraries(array_list_test utils ${CUNIT_LIBRARIES})
+    
+    add_executable(linked_list_test private/test/linked_list_test.c)
+    target_link_libraries(linked_list_test utils ${CUNIT_LIBRARIES})
+    
+    run_test(array_list_test)
+    run_test(hash_map_test)
+    run_test(hash_map_test_hash)
+    run_test(linked_list_test)
+endif (UTILS)
\ No newline at end of file