diff options
author | Nathaniel R. Lewis <linux.robotdude@gmail.com> | 2020-04-09 13:42:22 -0700 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-04-13 23:27:35 +0200 |
commit | 7fa1578471697eac9726261c3dcd06ded994aa21 (patch) | |
tree | bc1b99af48b6983ee6c4df5b12058c27e756c002 /lib | |
parent | f62bd9db90f2a1f25c6e30fea95bd828fbfedbf9 (diff) | |
download | curl-7fa1578471697eac9726261c3dcd06ded994aa21.tar.gz |
cmake: add aliases so exported target names are available in tree
Reviewed-by: Brad King
Closes #5206
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CMakeLists.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index a10403ace..1d71e1490 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -92,6 +92,11 @@ add_library( ${HHEADERS} ${CSOURCES} ) +add_library( + ${PROJECT_NAME}::${LIB_NAME} + ALIAS ${LIB_NAME} + ) + if(MSVC AND NOT BUILD_SHARED_LIBS) set_target_properties(${LIB_NAME} PROPERTIES STATIC_LIBRARY_FLAGS ${CMAKE_EXE_LINKER_FLAGS}) endif() @@ -143,5 +148,5 @@ install(TARGETS ${LIB_NAME} export(TARGETS ${LIB_NAME} APPEND FILE ${PROJECT_BINARY_DIR}/libcurl-target.cmake - NAMESPACE CURL:: + NAMESPACE ${PROJECT_NAME}:: ) |