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

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

commit 91fb6762072e5964863e219e248c3ceac941f00e
Author: Pepijn Noltes <[email protected]>
AuthorDate: Sat Apr 1 12:33:50 2023 +0200

    Move non celix prefix framework headers to include_deprecated dir
---
 cmake/celix_project/CelixProject.cmake              | 21 ++++++++++++++++++++-
 libs/framework/CMakeLists.txt                       |  8 ++++++--
 .../{include => include_deprecated}/archive.h       |  0
 .../{include => include_deprecated}/bundle.h        |  0
 .../bundle_activator.h                              |  0
 .../bundle_archive.h                                |  0
 .../bundle_context.h                                |  0
 .../{include => include_deprecated}/bundle_event.h  |  0
 .../bundle_listener.h                               |  0
 .../bundle_revision.h                               |  0
 .../{include => include_deprecated}/bundle_state.h  |  0
 .../{include => include_deprecated}/capability.h    |  0
 .../{include => include_deprecated}/dm_activator.h  |  0
 .../{include => include_deprecated}/dm_component.h  |  0
 .../dm_dependency_manager.h                         |  0
 .../dm_service_dependency.h                         |  0
 .../{include => include_deprecated}/framework.h     |  0
 .../framework_event.h                               |  0
 .../framework_exports.h                             |  0
 .../framework_listener.h                            |  0
 .../listener_hook_service.h                         |  0
 .../{include => include_deprecated}/manifest.h      |  0
 .../{include => include_deprecated}/module.h        |  0
 .../{include => include_deprecated}/requirement.h   |  0
 .../{include => include_deprecated}/service_event.h |  0
 .../service_factory.h                               |  0
 .../service_listener.h                              |  0
 .../service_reference.h                             |  0
 .../service_registration.h                          |  0
 .../service_registry.h                              |  0
 .../service_tracker.h                               |  0
 .../service_tracker_customizer.h                    |  0
 .../{include => include_deprecated}/wire.h          |  0
 .../{include => include_deprecated}/celixbool.h     |  0
 34 files changed, 26 insertions(+), 3 deletions(-)

diff --git a/cmake/celix_project/CelixProject.cmake 
b/cmake/celix_project/CelixProject.cmake
index 99aba815..132492b4 100644
--- a/cmake/celix_project/CelixProject.cmake
+++ b/cmake/celix_project/CelixProject.cmake
@@ -89,8 +89,11 @@ Custom target which list the Celix CMake targets that are 
still using deprecated
 if (NOT TARGET celix-deprecated)
     add_custom_target(celix-deprecated
         COMMAND ${CMAKE_COMMAND} -E echo "Targets still using deprecated utils 
headers: $<JOIN:$<TARGET_PROPERTY:celix-deprecated,UTIL_TARGETS>, >"
+        COMMAND ${CMAKE_COMMAND} -E echo "Targets still using deprecated 
framework headers: 
$<JOIN:$<TARGET_PROPERTY:celix-deprecated,FRAMEWORK_TARGETS>, >"
     )
     set_target_properties(celix-deprecated PROPERTIES "UTIL_TARGETS" "")
+    set_target_properties(celix-deprecated PROPERTIES "FRAMEWORK_TARGETS" "")
+
 endif ()
 
 
@@ -103,9 +106,25 @@ celix_deprecated_utils_headers(<target_name>))
 ]]
 function(celix_deprecated_utils_headers)
     list(GET ARGN 0 TARGET_NAME)
-    target_include_directories(${TARGET_NAME} PRIVATE 
${CMAKE_SOURCE_DIR}/libs/utils/include_deprecated)
+    get_target_property(UTILS_SOURCE__DIR Celix::utils "SOURCE_DIR")
+    target_include_directories(${TARGET_NAME} PRIVATE 
${UTILS_SOURCE__DIR}/include_deprecated)
     set_property(TARGET celix-deprecated APPEND PROPERTY "UTIL_TARGETS" 
"${TARGET_NAME}")
 endfunction()
 
+
+#[[
+Add include path for the Celix framework deprecated headers to the provided 
target (as PRIVATE)
+
+```CMake
+celix_deprecated_framework_headers(<target_name>))
+```
+]]
+function(celix_deprecated_framework_headers)
+    list(GET ARGN 0 TARGET_NAME)
+    get_target_property(UTILS_SOURCE__DIR Celix::framework "SOURCE_DIR")
+    target_include_directories(${TARGET_NAME} PRIVATE 
${UTILS_SOURCE__DIR}/include_deprecated)
+    set_property(TARGET celix-deprecated APPEND PROPERTY "FRAMEWORK_TARGETS" 
"${TARGET_NAME}")
+endfunction()
+
 include(${CMAKE_CURRENT_LIST_DIR}/ApacheRat.cmake)
 include(${CMAKE_CURRENT_LIST_DIR}/CodeCoverage.cmake)
diff --git a/libs/framework/CMakeLists.txt b/libs/framework/CMakeLists.txt
index d4bb5f56..8cc42270 100644
--- a/libs/framework/CMakeLists.txt
+++ b/libs/framework/CMakeLists.txt
@@ -37,8 +37,11 @@ set(SOURCES
         src/celix_module_private.h)
 add_library(framework_obj OBJECT ${SOURCES})
 target_include_directories(framework_obj PUBLIC
-        $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
-        )
+    $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>
+)
+target_include_directories(framework_obj PUBLIC
+    $<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include_deprecated>
+)
 target_compile_options(framework_obj PRIVATE -DUSE_FILE32API)
 target_compile_options(framework_obj PRIVATE -Wno-deprecated-declarations) 
#note part of the api is deprecated, ignore this warning on own api
 target_link_libraries(framework_obj PUBLIC Celix::utils 
${CELIX_OPTIONAL_EXTRA_LIBS})
@@ -57,6 +60,7 @@ celix_deprecated_utils_headers(framework)
 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)
 
 #Alias setup to match external usage
 add_library(Celix::framework ALIAS framework)
diff --git a/libs/framework/include/archive.h 
b/libs/framework/include_deprecated/archive.h
similarity index 100%
rename from libs/framework/include/archive.h
rename to libs/framework/include_deprecated/archive.h
diff --git a/libs/framework/include/bundle.h 
b/libs/framework/include_deprecated/bundle.h
similarity index 100%
rename from libs/framework/include/bundle.h
rename to libs/framework/include_deprecated/bundle.h
diff --git a/libs/framework/include/bundle_activator.h 
b/libs/framework/include_deprecated/bundle_activator.h
similarity index 100%
rename from libs/framework/include/bundle_activator.h
rename to libs/framework/include_deprecated/bundle_activator.h
diff --git a/libs/framework/include/bundle_archive.h 
b/libs/framework/include_deprecated/bundle_archive.h
similarity index 100%
rename from libs/framework/include/bundle_archive.h
rename to libs/framework/include_deprecated/bundle_archive.h
diff --git a/libs/framework/include/bundle_context.h 
b/libs/framework/include_deprecated/bundle_context.h
similarity index 100%
rename from libs/framework/include/bundle_context.h
rename to libs/framework/include_deprecated/bundle_context.h
diff --git a/libs/framework/include/bundle_event.h 
b/libs/framework/include_deprecated/bundle_event.h
similarity index 100%
rename from libs/framework/include/bundle_event.h
rename to libs/framework/include_deprecated/bundle_event.h
diff --git a/libs/framework/include/bundle_listener.h 
b/libs/framework/include_deprecated/bundle_listener.h
similarity index 100%
rename from libs/framework/include/bundle_listener.h
rename to libs/framework/include_deprecated/bundle_listener.h
diff --git a/libs/framework/include/bundle_revision.h 
b/libs/framework/include_deprecated/bundle_revision.h
similarity index 100%
rename from libs/framework/include/bundle_revision.h
rename to libs/framework/include_deprecated/bundle_revision.h
diff --git a/libs/framework/include/bundle_state.h 
b/libs/framework/include_deprecated/bundle_state.h
similarity index 100%
rename from libs/framework/include/bundle_state.h
rename to libs/framework/include_deprecated/bundle_state.h
diff --git a/libs/framework/include/capability.h 
b/libs/framework/include_deprecated/capability.h
similarity index 100%
rename from libs/framework/include/capability.h
rename to libs/framework/include_deprecated/capability.h
diff --git a/libs/framework/include/dm_activator.h 
b/libs/framework/include_deprecated/dm_activator.h
similarity index 100%
rename from libs/framework/include/dm_activator.h
rename to libs/framework/include_deprecated/dm_activator.h
diff --git a/libs/framework/include/dm_component.h 
b/libs/framework/include_deprecated/dm_component.h
similarity index 100%
rename from libs/framework/include/dm_component.h
rename to libs/framework/include_deprecated/dm_component.h
diff --git a/libs/framework/include/dm_dependency_manager.h 
b/libs/framework/include_deprecated/dm_dependency_manager.h
similarity index 100%
rename from libs/framework/include/dm_dependency_manager.h
rename to libs/framework/include_deprecated/dm_dependency_manager.h
diff --git a/libs/framework/include/dm_service_dependency.h 
b/libs/framework/include_deprecated/dm_service_dependency.h
similarity index 100%
rename from libs/framework/include/dm_service_dependency.h
rename to libs/framework/include_deprecated/dm_service_dependency.h
diff --git a/libs/framework/include/framework.h 
b/libs/framework/include_deprecated/framework.h
similarity index 100%
rename from libs/framework/include/framework.h
rename to libs/framework/include_deprecated/framework.h
diff --git a/libs/framework/include/framework_event.h 
b/libs/framework/include_deprecated/framework_event.h
similarity index 100%
rename from libs/framework/include/framework_event.h
rename to libs/framework/include_deprecated/framework_event.h
diff --git a/libs/framework/include/framework_exports.h 
b/libs/framework/include_deprecated/framework_exports.h
similarity index 100%
rename from libs/framework/include/framework_exports.h
rename to libs/framework/include_deprecated/framework_exports.h
diff --git a/libs/framework/include/framework_listener.h 
b/libs/framework/include_deprecated/framework_listener.h
similarity index 100%
rename from libs/framework/include/framework_listener.h
rename to libs/framework/include_deprecated/framework_listener.h
diff --git a/libs/framework/include/listener_hook_service.h 
b/libs/framework/include_deprecated/listener_hook_service.h
similarity index 100%
rename from libs/framework/include/listener_hook_service.h
rename to libs/framework/include_deprecated/listener_hook_service.h
diff --git a/libs/framework/include/manifest.h 
b/libs/framework/include_deprecated/manifest.h
similarity index 100%
rename from libs/framework/include/manifest.h
rename to libs/framework/include_deprecated/manifest.h
diff --git a/libs/framework/include/module.h 
b/libs/framework/include_deprecated/module.h
similarity index 100%
rename from libs/framework/include/module.h
rename to libs/framework/include_deprecated/module.h
diff --git a/libs/framework/include/requirement.h 
b/libs/framework/include_deprecated/requirement.h
similarity index 100%
rename from libs/framework/include/requirement.h
rename to libs/framework/include_deprecated/requirement.h
diff --git a/libs/framework/include/service_event.h 
b/libs/framework/include_deprecated/service_event.h
similarity index 100%
rename from libs/framework/include/service_event.h
rename to libs/framework/include_deprecated/service_event.h
diff --git a/libs/framework/include/service_factory.h 
b/libs/framework/include_deprecated/service_factory.h
similarity index 100%
rename from libs/framework/include/service_factory.h
rename to libs/framework/include_deprecated/service_factory.h
diff --git a/libs/framework/include/service_listener.h 
b/libs/framework/include_deprecated/service_listener.h
similarity index 100%
rename from libs/framework/include/service_listener.h
rename to libs/framework/include_deprecated/service_listener.h
diff --git a/libs/framework/include/service_reference.h 
b/libs/framework/include_deprecated/service_reference.h
similarity index 100%
rename from libs/framework/include/service_reference.h
rename to libs/framework/include_deprecated/service_reference.h
diff --git a/libs/framework/include/service_registration.h 
b/libs/framework/include_deprecated/service_registration.h
similarity index 100%
rename from libs/framework/include/service_registration.h
rename to libs/framework/include_deprecated/service_registration.h
diff --git a/libs/framework/include/service_registry.h 
b/libs/framework/include_deprecated/service_registry.h
similarity index 100%
rename from libs/framework/include/service_registry.h
rename to libs/framework/include_deprecated/service_registry.h
diff --git a/libs/framework/include/service_tracker.h 
b/libs/framework/include_deprecated/service_tracker.h
similarity index 100%
rename from libs/framework/include/service_tracker.h
rename to libs/framework/include_deprecated/service_tracker.h
diff --git a/libs/framework/include/service_tracker_customizer.h 
b/libs/framework/include_deprecated/service_tracker_customizer.h
similarity index 100%
rename from libs/framework/include/service_tracker_customizer.h
rename to libs/framework/include_deprecated/service_tracker_customizer.h
diff --git a/libs/framework/include/wire.h 
b/libs/framework/include_deprecated/wire.h
similarity index 100%
rename from libs/framework/include/wire.h
rename to libs/framework/include_deprecated/wire.h
diff --git a/libs/utils/include/celixbool.h 
b/libs/utils/include_deprecated/celixbool.h
similarity index 100%
rename from libs/utils/include/celixbool.h
rename to libs/utils/include_deprecated/celixbool.h

Reply via email to