This is an automated email from the ASF dual-hosted git repository. pnoltes pushed a commit to branch feature/export_headers in repository https://gitbox.apache.org/repos/asf/celix.git
commit 5d24e83162e6ebfabe03d7ec1e8f33fd583ee6af Author: Pepijn Noltes <[email protected]> AuthorDate: Sun Apr 16 10:51:35 2023 +0200 Remove VISIBILITY_INLINES_HIDDEN from c libs visibility config --- libs/dfi/CMakeLists.txt | 1 - libs/etcdlib/CMakeLists.txt | 1 - libs/framework/CMakeLists.txt | 20 +++++++++++++++----- libs/utils/CMakeLists.txt | 1 - 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/libs/dfi/CMakeLists.txt b/libs/dfi/CMakeLists.txt index d74950f0..5b5289e3 100644 --- a/libs/dfi/CMakeLists.txt +++ b/libs/dfi/CMakeLists.txt @@ -43,7 +43,6 @@ if (CELIX_DFI) target_link_libraries(dfi PUBLIC jansson::jansson) set_target_properties(dfi PROPERTIES C_VISIBILITY_PRESET hidden - VISIBILITY_INLINES_HIDDEN ON VERSION "1.0.0" "SOVERSION" 1 OUTPUT_NAME "celix_dfi") diff --git a/libs/etcdlib/CMakeLists.txt b/libs/etcdlib/CMakeLists.txt index 23a677c9..f89bde78 100644 --- a/libs/etcdlib/CMakeLists.txt +++ b/libs/etcdlib/CMakeLists.txt @@ -63,7 +63,6 @@ if (CELIX_ETCDLIB OR ETCDLIB_STANDALONE) VERSION 1.0.0 SOVERSION 1 C_VISIBILITY_PRESET hidden - VISIBILITY_INLINES_HIDDEN ON ) target_link_libraries(etcdlib PUBLIC CURL::libcurl jansson::jansson ${CELIX_OPTIONAL_EXTRA_LIBS}) diff --git a/libs/framework/CMakeLists.txt b/libs/framework/CMakeLists.txt index bf3a560c..3febe6be 100644 --- a/libs/framework/CMakeLists.txt +++ b/libs/framework/CMakeLists.txt @@ -47,18 +47,28 @@ target_link_libraries(framework_obj PUBLIC libuuid::libuuid CURL::libcurl ZLIB:: target_link_libraries(framework_obj PRIVATE ${CMAKE_DL_LIBS}) celix_deprecated_utils_headers(framework_obj) +generate_export_header(framework_obj + BASE_NAME "CELIX_FRAMWORK" + EXPORT_FILE_NAME "${CMAKE_BINARY_DIR}/celix/gen/includes/framework/celix_framework_export.h") +target_include_directories(utils_obj PUBLIC $<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/celix/gen/includes/framework>) + add_library(framework SHARED) target_link_libraries(framework PUBLIC framework_obj) -set_target_properties(framework PROPERTIES OUTPUT_NAME "celix_framework") -set_target_properties(framework PROPERTIES "SOVERSION" ${CELIX_MAJOR}) +set_target_properties(framework + PROPERTIES + C_VISIBILITY_PRESET hidden + "VERSION" "${CELIX_MAJOR}.${CELIX_MINOR}.${CELIX_MICRO}" + "SOVERSION" ${CELIX_MAJOR} + OUTPUT_NAME "celix_framework") celix_deprecated_utils_headers(framework) # By omitting OBJECTS DESTINATION, object files will NOT be installed. install(TARGETS framework framework_obj EXPORT celix LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT framework - INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix) -install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix COMPONENT framework) -install(DIRECTORY include_deprecated/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix COMPONENT framework) + INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix_framework) +install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix_framework COMPONENT framework) +install(DIRECTORY include_deprecated/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix_framework COMPONENT framework) +install(DIRECTORY ${CMAKE_BINARY_DIR}/celix/gen/includes/framework/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix_framework COMPONENT framework) #Alias setup to match external usage add_library(Celix::framework ALIAS framework) diff --git a/libs/utils/CMakeLists.txt b/libs/utils/CMakeLists.txt index 87ba290b..3623a29d 100644 --- a/libs/utils/CMakeLists.txt +++ b/libs/utils/CMakeLists.txt @@ -81,7 +81,6 @@ target_link_libraries(utils PUBLIC utils_obj) set_target_properties(utils PROPERTIES C_VISIBILITY_PRESET hidden - VISIBILITY_INLINES_HIDDEN true SOVERSION ${CELIX_MAJOR} OUTPUT_NAME "celix_utils")
