You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
559 B
16 lines
559 B
|
6 years ago
|
macro(try_add_imported_target LIBNAME)
|
||
|
|
string(TOLOWER ${LIBNAME} ${LIBNAME}_lwr)
|
||
|
|
set(${LIBNAME}_TARGET 3ds::${${LIBNAME}_lwr})
|
||
|
|
if(${LIBNAME}_FOUND AND NOT TARGET ${${LIBNAME}_TARGET})
|
||
|
|
add_library(${${LIBNAME}_TARGET} STATIC IMPORTED GLOBAL)
|
||
|
|
|
||
|
|
set_target_properties(${${LIBNAME}_TARGET} PROPERTIES
|
||
|
|
IMPORTED_LOCATION "${${LIBNAME}_LIBRARY}"
|
||
|
|
INTERFACE_INCLUDE_DIRECTORIES "${${LIBNAME}_INCLUDE_DIR}")
|
||
|
|
|
||
|
|
if(${ARGC} GREATER 1)
|
||
|
|
target_link_libraries(${${LIBNAME}_TARGET} INTERFACE ${ARGN})
|
||
|
|
endif()
|
||
|
|
endif()
|
||
|
|
endmacro()
|