This is an automated email from the ASF dual-hosted git repository.
pengzheng pushed a commit to branch feature/remove_dfi_dep
in repository https://gitbox.apache.org/repos/asf/celix.git
The following commit(s) were added to refs/heads/feature/remove_dfi_dep by this
push:
new 07685f7c Fix standalone etcdlib build error.
07685f7c is described below
commit 07685f7cda8102eb82408f2bf6f11c33aca6bc2a
Author: PengZheng <[email protected]>
AuthorDate: Thu Feb 9 19:58:18 2023 +0800
Fix standalone etcdlib build error.
---
libs/etcdlib/CMakeLists.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/etcdlib/CMakeLists.txt b/libs/etcdlib/CMakeLists.txt
index ccde2060..885bb38a 100644
--- a/libs/etcdlib/CMakeLists.txt
+++ b/libs/etcdlib/CMakeLists.txt
@@ -15,8 +15,6 @@
# specific language governing permissions and limitations
# under the License.
-find_package(CURL REQUIRED)
-find_package(jansson REQUIRED)
if (NOT COMMAND celix_subproject)
#If COMMAND celix_subproject is not defined, this CMakeLists will
@@ -37,7 +35,7 @@ if (NOT COMMAND celix_subproject)
set(CMAKE_EXE_LINKER_FLAGS "-pthread ${CMAKE_EXE_LINKER_FLAGS}")
set(ETCDLIB_CMP ${CMAKE_INSTALL_DEFAULT_COMPONENT_NAME})
-
+ find_package(CURL REQUIRED)
if (NOT TARGET CURL::libcurl)
#Note more recent curl will create CURL::libcurl target
message("Note CURL::libcurl target not created by find_package(CURL).
Creating CURL::libcurl Target.")
@@ -51,9 +49,11 @@ if (NOT COMMAND celix_subproject)
else()
set(ETCDLIB_CMP framework)
celix_subproject(CELIX_ETCDLIB "Option to build the ETCD library" ON)
+ find_package(CURL REQUIRED)
endif ()
if (CELIX_ETCDLIB OR ETCDLIB_STANDALONE)
+ find_package(jansson REQUIRED)
add_library(etcdlib SHARED
src/etcd.c
)