[Tarantool-patches] [PATCH 2/2] build: install libCURL headers

Roman Khabibov roman.habibov at tarantool.org
Fri Mar 19 16:45:55 MSK 2021


Ship libCURL headers to system path "include/tarantool" in the
case of libCURL included as bundled library or static build.
---
 CMakeLists.txt                           | 7 +++++++
 changelogs/unreleased/install-headers.md | 4 ++++
 rpm/tarantool.spec                       | 9 +++++++++
 3 files changed, 20 insertions(+)
 create mode 100755 changelogs/unreleased/install-headers.md

diff --git a/CMakeLists.txt b/CMakeLists.txt
index feb56dfca..005fe0cd7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -428,6 +428,13 @@ else()
     find_package(CURL)
 endif()
 
+# Install headers.
+if (ENABLE_BUNDLED_LIBCURL OR BUILD_STATIC)
+    install(DIRECTORY "${CURL_INCLUDE_DIRS}/curl"
+            DESTINATION ${MODULE_FULL_INCLUDEDIR}
+            FILES_MATCHING PATTERN "*.h")
+endif()
+
 #
 # Export libcurl symbols if the library is linked statically.
 #
diff --git a/changelogs/unreleased/install-headers.md b/changelogs/unreleased/install-headers.md
new file mode 100755
index 000000000..4494a14c8
--- /dev/null
+++ b/changelogs/unreleased/install-headers.md
@@ -0,0 +1,4 @@
+## feature/build
+
+* Ship libCURL headers to system path "include/tarantool" in the
+case of libCURL included as bundled library or static build (gh-####).
\ No newline at end of file
diff --git a/rpm/tarantool.spec b/rpm/tarantool.spec
index 92e693955..d19df8925 100644
--- a/rpm/tarantool.spec
+++ b/rpm/tarantool.spec
@@ -268,6 +268,15 @@ fi
 %{_includedir}/tarantool/luajit.h
 %{_includedir}/tarantool/lualib.h
 %{_includedir}/tarantool/module.h
+%{_includedir}/tarantool/curl/curl.h
+%{_includedir}/tarantool/curl/curlver.h
+%{_includedir}/tarantool/curl/easy.h
+%{_includedir}/tarantool/curl/mprintf.h
+%{_includedir}/tarantool/curl/multi.h
+%{_includedir}/tarantool/curl/stdcheaders.h
+%{_includedir}/tarantool/curl/system.h
+%{_includedir}/tarantool/curl/typecheck-gcc.h
+%{_includedir}/tarantool/curl/urlapi.h
 
 %changelog
 * Tue Sep 12 2017 Roman Tsisyk <roman at tarantool.org> 1.7.5.46-1
-- 
2.24.3 (Apple Git-128)



More information about the Tarantool-patches mailing list