summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNathaniel R. Lewis <linux.robotdude@gmail.com>2020-04-09 13:42:22 -0700
committerDaniel Stenberg <daniel@haxx.se>2020-04-13 23:27:35 +0200
commit7fa1578471697eac9726261c3dcd06ded994aa21 (patch)
treebc1b99af48b6983ee6c4df5b12058c27e756c002 /src
parentf62bd9db90f2a1f25c6e30fea95bd828fbfedbf9 (diff)
downloadcurl-7fa1578471697eac9726261c3dcd06ded994aa21.tar.gz
cmake: add aliases so exported target names are available in tree
Reviewed-by: Brad King Closes #5206
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index dbd348ade..26e3cfe1e 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -67,6 +67,11 @@ add_executable(
${CURL_FILES}
)
+add_executable(
+ ${PROJECT_NAME}::${EXE_NAME}
+ ALIAS ${EXE_NAME}
+ )
+
if(CURL_HAS_LTO)
set_target_properties(${EXE_NAME} PROPERTIES
INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE
@@ -99,5 +104,5 @@ target_link_libraries(${EXE_NAME} libcurl ${CURL_LIBS})
install(TARGETS ${EXE_NAME} EXPORT ${TARGETS_EXPORT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
export(TARGETS ${EXE_NAME}
APPEND FILE ${PROJECT_BINARY_DIR}/curl-target.cmake
- NAMESPACE CURL::
+ NAMESPACE ${PROJECT_NAME}::
)