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 2011/05/25 22:51:20 UTC

svn commit: r1127681 - in /incubator/celix/trunk: CMakeLists.txt dependency_manager/CMakeLists.txt

Author: abroekhuis
Date: Wed May 25 20:51:20 2011
New Revision: 1127681

URL: http://svn.apache.org/viewvc?rev=1127681&view=rev
Log:
Applied patch from CELIX-4. Fixes linking libs on x86_64 and disables the deployer subproject (which doesn't exist).

Modified:
    incubator/celix/trunk/CMakeLists.txt
    incubator/celix/trunk/dependency_manager/CMakeLists.txt

Modified: incubator/celix/trunk/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/CMakeLists.txt?rev=1127681&r1=1127680&r2=1127681&view=diff
==============================================================================
--- incubator/celix/trunk/CMakeLists.txt (original)
+++ incubator/celix/trunk/CMakeLists.txt Wed May 25 20:51:20 2011
@@ -60,7 +60,6 @@ add_subdirectory(shell_tui)
 #add_subdirectory(receiver-2.0)
 #add_subdirectory(sender)
 
-add_subdirectory(deployer)
 add_subdirectory(hello_world)
 add_subdirectory(mongoose)
 #add_subdirectory(echo_service/client)
@@ -71,4 +70,4 @@ add_subdirectory(whiteboard)
 add_subdirectory(celix_test)
 
 include(target.cmake)
-enable_testing()
\ No newline at end of file
+enable_testing()

Modified: incubator/celix/trunk/dependency_manager/CMakeLists.txt
URL: http://svn.apache.org/viewvc/incubator/celix/trunk/dependency_manager/CMakeLists.txt?rev=1127681&r1=1127680&r2=1127681&view=diff
==============================================================================
--- incubator/celix/trunk/dependency_manager/CMakeLists.txt (original)
+++ incubator/celix/trunk/dependency_manager/CMakeLists.txt Wed May 25 20:51:20 2011
@@ -15,6 +15,18 @@
 # 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)
\ No newline at end of file
+target_link_libraries(dependency_manager framework)