aboutsummaryrefslogtreecommitdiff
path: root/lib/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CMakeLists.txt')
-rw-r--r--lib/CMakeLists.txt19
1 files changed, 18 insertions, 1 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
index d6c996189..1fabdba90 100644
--- a/lib/CMakeLists.txt
+++ b/lib/CMakeLists.txt
@@ -108,7 +108,24 @@ if(WIN32)
endif()
endif()
+target_include_directories(${LIB_NAME} INTERFACE
+ $<INSTALL_INTERFACE:include>)
+
install(TARGETS ${LIB_NAME}
+ EXPORT libcurl-target
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
- RUNTIME DESTINATION bin)
+ RUNTIME DESTINATION bin
+)
+
+export(TARGETS ${LIB_NAME}
+ APPEND FILE ${PROJECT_BINARY_DIR}/libcurl-target.cmake
+ NAMESPACE CURL::
+)
+
+install(EXPORT libcurl-target
+ FILE libcurl-target.cmake
+ NAMESPACE CURL::
+ DESTINATION ${CURL_INSTALL_CMAKE_DIR}
+)
+