mirror of
https://github.com/curl/curl.git
synced 2026-08-25 00:13:34 +03:00
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
This commit is contained in:
parent
58a9e770e3
commit
1cb4f5d6e8
5 changed files with 117 additions and 4 deletions
|
|
@ -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}
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue