From 3d24cf1e9687f248767c3a736ab1b35fa07999ef Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Sun, 9 May 2021 19:25:23 +0200 Subject: [PATCH] pull: Install header files for embedded civetweb Fixes: #479 --- cmake/civetweb-3rdparty-config.cmake | 5 +++++ pull/CMakeLists.txt | 2 ++ 2 files changed, 7 insertions(+) diff --git a/cmake/civetweb-3rdparty-config.cmake b/cmake/civetweb-3rdparty-config.cmake index 242509e5..642226e3 100644 --- a/cmake/civetweb-3rdparty-config.cmake +++ b/cmake/civetweb-3rdparty-config.cmake @@ -19,6 +19,11 @@ add_library(civetweb OBJECT ${_IMPORT_PREFIX}/src/md5.inl ) +set_property(TARGET civetweb PROPERTY PUBLIC_HEADER + ${_IMPORT_PREFIX}/include/CivetServer.h + ${_IMPORT_PREFIX}/include/civetweb.h +) + target_compile_definitions(civetweb PRIVATE CIVETWEB_API= diff --git a/pull/CMakeLists.txt b/pull/CMakeLists.txt index db1452e7..250128d7 100644 --- a/pull/CMakeLists.txt +++ b/pull/CMakeLists.txt @@ -4,6 +4,8 @@ if(USE_THIRDPARTY_LIBRARIES) install( TARGETS civetweb EXPORT ${PROJECT_NAME}-targets + # keep embedded civetweb headers scoped to prometheus(-cpp) + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/prometheus ) else() find_package(civetweb CONFIG REQUIRED)