diff options
author | Jakub Zakrzewski <slither.jz@gmail.com> | 2017-09-10 16:56:16 +0200 |
---|---|---|
committer | Jakub Zakrzewski <slither.jz@gmail.com> | 2017-10-28 17:22:47 +0200 |
commit | 1cb4f5d6e8e470638759a48ba99fda230089712f (patch) | |
tree | bb5c4021aae5816656defc0e4a65eb8d6e07604e /src/CMakeLists.txt | |
parent | 58a9e770e331e393f9b16cdbe0edb4de86552c7e (diff) | |
download | curl-1cb4f5d6e8e470638759a48ba99fda230089712f.tar.gz |
cmake: Export libcurl and curl targets to use by other cmake projects
The config files define curl and libcurl targets as imported targets
CURL::curl and CURL::libcurl. For backward compatibility with CMake-
provided find-module the CURL_INCLUDE_DIRS and CURL_LIBRARIES are
also set.
Closes #1879
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index de188be66..085c150e2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -76,4 +76,15 @@ set_target_properties(${EXE_NAME} PROPERTIES #INCLUDE(ModuleInstall OPTIONAL) -install(TARGETS ${EXE_NAME} DESTINATION bin) +install(TARGETS ${EXE_NAME} EXPORT curl-target DESTINATION bin) +export(TARGETS ${EXE_NAME} + APPEND FILE ${PROJECT_BINARY_DIR}/curl-target.cmake + NAMESPACE CURL:: +) + +install(EXPORT curl-target + FILE curl-target.cmake + NAMESPACE CURL:: + DESTINATION ${CURL_INSTALL_CMAKE_DIR} +) + |