You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celix.apache.org by pn...@apache.org on 2019/04/25 18:27:48 UTC

[celix] branch develop updated: CELIX-456: Fixes OSX build issues. Since 10.14 the usage of target_include_directories( SYSTEM PRIVATE ) results in wrong system include paths

This is an automated email from the ASF dual-hosted git repository.

pnoltes pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/celix.git


The following commit(s) were added to refs/heads/develop by this push:
     new 01f6d38  CELIX-456: Fixes OSX build issues. Since 10.14 the usage of target_include_directories(<target> SYSTEM PRIVATE <include_dir>) results in wrong system include paths
01f6d38 is described below

commit 01f6d385013327f9dd0eece92058b8895c332906
Author: Pepijn Noltes <pe...@gmail.com>
AuthorDate: Thu Apr 25 20:24:23 2019 +0200

    CELIX-456: Fixes OSX build issues. Since 10.14 the usage of target_include_directories(<target> SYSTEM PRIVATE <include_dir>) results in wrong system include paths
    
    Note that SYSTEM is used to skip compile warnings on third party libs
---
 .travis.yml                                        |  8 ++++----
 CMakeLists.txt                                     |  2 ++
 bundles/deployment_admin/CMakeLists.txt            |  6 ------
 .../remote_service_admin_dfi/CMakeLists.txt        |  5 +++--
 libs/framework/CMakeLists.txt                      | 22 ++--------------------
 libs/framework/src/bundle.c                        |  2 +-
 libs/framework/src/service_tracker.c               |  4 ++--
 7 files changed, 14 insertions(+), 35 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 6c9ac09..8d2adb4 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -24,10 +24,10 @@ matrix:
        - os: linux
          dist: trusty
          compiler: clang
-         #       - os: osx
-         #osx_image: xcode7.3
-         #compiler: clang
-         #env: MACOSX_DEPLOYMENT_TARGET=10.11
+       - os: osx
+         osx_image: xcode7.3
+         compiler: clang
+         env: MACOSX_DEPLOYMENT_TARGET=10.11
        - os: linux
          dist: trusty
          compiler: gcc
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 36656e9..ad165dc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -18,9 +18,11 @@
 cmake_minimum_required (VERSION 3.2)
 cmake_policy(SET CMP0012 NEW)
 cmake_policy(SET CMP0042 NEW)
+cmake_policy(SET CMP0068 NEW)
 
 project (Celix C CXX)
 
+
 include(cmake/celix_project/CelixProject.cmake)
 include(cmake/cmake_celix/UseCelix.cmake)
 
diff --git a/bundles/deployment_admin/CMakeLists.txt b/bundles/deployment_admin/CMakeLists.txt
index e209a08..de7793d 100644
--- a/bundles/deployment_admin/CMakeLists.txt
+++ b/bundles/deployment_admin/CMakeLists.txt
@@ -46,12 +46,6 @@ if (DEPLOYMENT_ADMIN)
     )
 
     target_compile_definitions(deployment_admin PRIVATE -DUSE_FILE32API)
-    target_include_directories(deployment_admin PRIVATE src)
-    target_include_directories(deployment_admin SYSTEM PRIVATE
-            ${CURL_INCLUDE_DIRS}
-            ${UUID_INCLUDE_DIRS}
-            ${ZLIB_INCLUDE_DIRS}
-    )
     target_link_libraries(deployment_admin PRIVATE ${CURL_LIBRARIES} ${UUID_LIBRARIES} ${ZLIB_LIBRARIES} deployment_admin_api)
 
     install(TARGETS deployment_admin_api EXPORT celix COMPONENT deployment_admin)
diff --git a/bundles/remote_services/remote_service_admin_dfi/CMakeLists.txt b/bundles/remote_services/remote_service_admin_dfi/CMakeLists.txt
index ac53eb2..d241d7b 100644
--- a/bundles/remote_services/remote_service_admin_dfi/CMakeLists.txt
+++ b/bundles/remote_services/remote_service_admin_dfi/CMakeLists.txt
@@ -38,8 +38,9 @@ if (RSA_REMOTE_SERVICE_ADMIN_DFI)
             $<TARGET_OBJECTS:Celix::civetweb>
     )
     celix_bundle_private_libs(rsa_dfi Celix::dfi)
-    target_include_directories(rsa_dfi PRIVATE src $<TARGET_PROPERTY:Celix::civetweb,INCLUDE_DIRECTORIES>)
-    target_include_directories(rsa_dfi SYSTEM PRIVATE ${CURL_INCLUDE_DIRS} ${JANSSON_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS})
+    target_include_directories(rsa_dfi PRIVATE $<TARGET_PROPERTY:Celix::civetweb,INCLUDE_DIRECTORIES>)
+    #target_include_directories(rsa_dfi SYSTEM PRIVATE ${CURL_INCLUDE_DIRS} ${JANSSON_INCLUDE_DIRS} ${UUID_INCLUDE_DIRS})
+    target_include_directories(rsa_dfi PRIVATE ${JANSSON_INCLUDE_DIRS})
     target_link_libraries(rsa_dfi PRIVATE
             Celix::dfi
             Celix::log_helper
diff --git a/libs/framework/CMakeLists.txt b/libs/framework/CMakeLists.txt
index 4e24a93..9ba007f 100644
--- a/libs/framework/CMakeLists.txt
+++ b/libs/framework/CMakeLists.txt
@@ -19,10 +19,6 @@ find_package(ZLIB REQUIRED)
 find_package(UUID REQUIRED)
 find_package(CURL REQUIRED)
 
-if(WIN32)
-    set(IO src/iowin32.c)
-endif(WIN32)
-
 set(SOURCES
         src/attribute.c src/bundle.c src/bundle_archive.c src/bundle_cache.c
         src/bundle_context.c src/bundle_revision.c src/capability.c src/celix_errorcodes.c
@@ -35,29 +31,15 @@ set(SOURCES
         src/celix_framework_factory.c
         src/dm_dependency_manager_impl.c src/dm_component_impl.c
         src/dm_service_dependency.c src/dm_event.c src/celix_library_loader.c
-        ${IO})
+)
 add_library(framework SHARED ${SOURCES})
 set_target_properties(framework PROPERTIES OUTPUT_NAME "celix_framework")
-target_include_directories(framework PUBLIC
+target_include_directories(framework PUBLIC 
         $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
         $<INSTALL_INTERFACE:include/celix>
 )
-target_include_directories(framework PRIVATE src)
-target_include_directories(framework SYSTEM PRIVATE 
-	${ZLIB_INCLUDE_DIRS}
-	${CURL_INCLUDE_DIRS}
-	${UUID_INCLUDE_DIRS}
-)
-
 target_compile_options(framework PRIVATE -DUSE_FILE32API)
-
 set_target_properties(framework PROPERTIES "SOVERSION" 2)
-
-if (APPLE)
-  #Queue ? target_compile_options(framework PRIVATE -D_POSIX_SOURCE)
-else ()
-  set(UUID ${UUID_LIBRARIES})
-endif()
 target_link_libraries(framework PUBLIC Celix::utils)
 target_link_libraries(framework PRIVATE ${UUID} ${ZLIB_LIBRARY} ${CURL_LIBRARIES})
 
diff --git a/libs/framework/src/bundle.c b/libs/framework/src/bundle.c
index 6e7a1d9..cd2610a 100644
--- a/libs/framework/src/bundle.c
+++ b/libs/framework/src/bundle.c
@@ -639,4 +639,4 @@ const char* celix_bundle_getSymbolicName(const celix_bundle_t *bnd) {
 		module_getSymbolicName(mod, &result);
 	}
 	return result;
-}
\ No newline at end of file
+}
diff --git a/libs/framework/src/service_tracker.c b/libs/framework/src/service_tracker.c
index 1bc26e1..8c3ecba 100644
--- a/libs/framework/src/service_tracker.c
+++ b/libs/framework/src/service_tracker.c
@@ -19,8 +19,8 @@
 #include <stdlib.h>
 #include <string.h>
 #include <stdio.h>
-#include <service_reference_private.h>
-#include <framework_private.h>
+#include "service_reference_private.h"
+#include "framework_private.h"
 #include <assert.h>
 
 #include "service_tracker_private.h"