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

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


The following commit(s) were added to refs/heads/feature/civetweb_integration 
by this push:
     new 24035c9f Reintroduce a dummy shared lib Celix::civetweb_shared.
24035c9f is described below

commit 24035c9f2ffb5604203c4a0c56e7d86ae2ca166a
Author: PengZheng <[email protected]>
AuthorDate: Mon Feb 6 21:26:07 2023 +0800

    Reintroduce a dummy shared lib Celix::civetweb_shared.
    
    This is needed to avoid breaking current downstream users. It will be 
removed in 3.0.0 release.
---
 bundles/http_admin/CMakeLists.txt                |  1 +
 bundles/http_admin/{ => civetweb}/CMakeLists.txt | 18 +++++++-----------
 bundles/http_admin/civetweb/src/civetweb_dummy.c | 20 ++++++++++++++++++++
 3 files changed, 28 insertions(+), 11 deletions(-)

diff --git a/bundles/http_admin/CMakeLists.txt 
b/bundles/http_admin/CMakeLists.txt
index 2bf8d829..e7d922c0 100644
--- a/bundles/http_admin/CMakeLists.txt
+++ b/bundles/http_admin/CMakeLists.txt
@@ -19,6 +19,7 @@ celix_subproject(HTTP_ADMIN "Service to use a HTTP server 
with websocket support
 if (HTTP_ADMIN)
     find_package(civetweb REQUIRED)
 
+    add_subdirectory(civetweb)
     add_subdirectory(http_admin_api)
     add_subdirectory(http_admin)
 
diff --git a/bundles/http_admin/CMakeLists.txt 
b/bundles/http_admin/civetweb/CMakeLists.txt
similarity index 70%
copy from bundles/http_admin/CMakeLists.txt
copy to bundles/http_admin/civetweb/CMakeLists.txt
index 2bf8d829..777911cb 100644
--- a/bundles/http_admin/CMakeLists.txt
+++ b/bundles/http_admin/civetweb/CMakeLists.txt
@@ -15,15 +15,11 @@
 # specific language governing permissions and limitations
 # under the License.
 
-celix_subproject(HTTP_ADMIN "Service to use a HTTP server with websocket 
support" ON)
-if (HTTP_ADMIN)
-    find_package(civetweb REQUIRED)
+#Create shared library
+add_library(civetweb_shared SHARED
+        src/civetweb_dummy.c
+        )
+add_library(Celix::civetweb_shared ALIAS civetweb_shared)
 
-    add_subdirectory(http_admin_api)
-    add_subdirectory(http_admin)
-
-    if (ENABLE_TESTING)
-        add_subdirectory(gtest)
-    endif()
-
-endif (HTTP_ADMIN)
+install(TARGETS civetweb_shared EXPORT celix DESTINATION 
${CMAKE_INSTALL_LIBDIR} COMPONENT http_admin
+        INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/celix/http_admin)
diff --git a/bundles/http_admin/civetweb/src/civetweb_dummy.c 
b/bundles/http_admin/civetweb/src/civetweb_dummy.c
new file mode 100644
index 00000000..8ea519f7
--- /dev/null
+++ b/bundles/http_admin/civetweb/src/civetweb_dummy.c
@@ -0,0 +1,20 @@
+/*
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied.  See the License for the
+  specific language governing permissions and limitations
+  under the License.
+ */
+
+void celix_civetweb_dummy(void) {}
\ No newline at end of file

Reply via email to