Skip to content

Commit

Permalink
cmake: add aliases so exported target names are available in tree.
Browse files Browse the repository at this point in the history
  • Loading branch information
teknoman117 committed Apr 9, 2020
1 parent d4afa0f commit e4512c7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ add_library(
${HHEADERS} ${CSOURCES}
)

add_library(
CURL::${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()
Expand Down
5 changes: 5 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ add_executable(
${CURL_FILES}
)

add_executable(
CURL::${EXE_NAME}
ALIAS ${EXE_NAME}
)

if(CURL_HAS_LTO)
set_target_properties(${EXE_NAME} PROPERTIES
INTERPROCEDURAL_OPTIMIZATION_RELEASE TRUE
Expand Down

0 comments on commit e4512c7

Please sign in to comment.