CMake: Emulate interface library on import (#108)

Closes: #104
Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
pull/113/head
Gregor Jasny 8 years ago committed by GitHub
parent cb9521d5f4
commit 4327d21009
  1. 6
      c-ares-config.cmake.in

@ -7,10 +7,12 @@ include("${CMAKE_CURRENT_LIST_DIR}/c-ares-targets.cmake")
set(c-ares_LIBRARY c-ares::cares)
if(@CARES_SHARED@)
add_library(c-ares::cares_shared ALIAS c-ares::cares)
add_library(c-ares::cares_shared INTERFACE IMPORTED)
set_target_properties(c-ares::cares_shared PROPERTIES INTERFACE_LINK_LIBRARIES "c-ares::cares")
set(c-ares_SHARED_LIBRARY c-ares::cares_shared)
elseif(@CARES_STATIC@)
add_library(c-ares::cares_static ALIAS c-ares::cares)
add_library(c-ares::cares_static INTERFACE IMPORTED)
set_target_properties(c-ares::cares_static PROPERTIES INTERFACE_LINK_LIBRARIES "c-ares::cares")
endif()
if(@CARES_STATIC@)

Loading…
Cancel
Save