celix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bpe...@apache.org
Subject celix git commit: CELIX-247: Adapt cmake configuration to allow android compilation
Date Fri, 22 Jan 2016 19:33:26 GMT
Repository: celix
Updated Branches:
  refs/heads/develop 38fd46111 -> 41287a355


CELIX-247: Adapt cmake configuration to allow android compilation


Project: http://git-wip-us.apache.org/repos/asf/celix/repo
Commit: http://git-wip-us.apache.org/repos/asf/celix/commit/41287a35
Tree: http://git-wip-us.apache.org/repos/asf/celix/tree/41287a35
Diff: http://git-wip-us.apache.org/repos/asf/celix/diff/41287a35

Branch: refs/heads/develop
Commit: 41287a355c19bb10bafd2c13aede4383fff64d99
Parents: 38fd461
Author: Bjoern Petri <bpetri@apache.org>
Authored: Fri Jan 22 20:32:39 2016 +0100
Committer: Bjoern Petri <bpetri@apache.org>
Committed: Fri Jan 22 20:32:39 2016 +0100

----------------------------------------------------------------------
 CMakeLists.txt       | 2 +-
 dfi/CMakeLists.txt   | 2 +-
 utils/CMakeLists.txt | 6 ++++--
 3 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/celix/blob/41287a35/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 375568c..69d3a91 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -37,7 +37,7 @@ IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} EQUAL 3.3 AND ${CMAKE_GENERATO
     message( FATAL_ERROR "Building Celix using CMake 3.3 and makefiles is not supported due
to a bug in the Makefile Generator (see Bug 15696). Please change the used CMake version -
both, CMake 3.2 and CMake 3.4 are working fine. Or use a different generator (e.g. Ninja)."
)
 ENDIF()
 
-IF(UNIX)
+IF(UNIX AND NOT ANDROID)
     SET(CMAKE_C_FLAGS "-D_GNU_SOURCE -std=gnu99 -Wall -Werror ${CMAKE_C_FLAGS}")
     #SET(CMAKE_CXX_FLAGS "-Wall -Werror ${CMAKE_CXX_FLAGS}")
 ENDIF()

http://git-wip-us.apache.org/repos/asf/celix/blob/41287a35/dfi/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/dfi/CMakeLists.txt b/dfi/CMakeLists.txt
index 43511fe..a783b32 100644
--- a/dfi/CMakeLists.txt
+++ b/dfi/CMakeLists.txt
@@ -28,7 +28,7 @@ include_directories(
 
 set(MEMSTREAM_SOURCES )
 set(MEMSTREAM_INCLUDES )
-if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") 
+if (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR ANDROID) 
 	set(MEMSTREAM_SOURCES private/src/memstream/open_memstream.c private/src/memstream/fmemopen.c)
 	set(MEMSTREAM_INCLUDES public/include/memstream/open_memstream.h public/include/memstream/fmemopen.h)
     include_directories(public/include/memstream)

http://git-wip-us.apache.org/repos/asf/celix/blob/41287a35/utils/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt
index bdf584d..77b1aa2 100644
--- a/utils/CMakeLists.txt
+++ b/utils/CMakeLists.txt
@@ -55,9 +55,11 @@ if (UTILS)
                 public/include/thpool.h
         )
     
-    IF(UNIX)
+    IF(UNIX AND NOT ANDROID)
         target_link_libraries(celix_utils m pthread)
-    ENDIF(UNIX)
+    ELSEIF(ANDROID)
+        target_link_libraries(celix_utils m)
+    ENDIF()
     
     install(TARGETS celix_utils DESTINATION lib COMPONENT framework)
     FILE(GLOB files "public/include/*.h")


Mime
View raw message