mirror of
https://github.com/vcmi/vcmi.git
synced 2025-07-13 01:20:34 +02:00
fix installing shared Boost libraries
This commit is contained in:
@ -516,7 +516,21 @@ macro(add_main_lib TARGET_NAME LIBRARY_TYPE)
|
|||||||
else()
|
else()
|
||||||
set(LINKED_LIB_REAL ${LINKED_LIB})
|
set(LINKED_LIB_REAL ${LINKED_LIB})
|
||||||
endif()
|
endif()
|
||||||
install(TARGETS ${LINKED_LIB_REAL} LIBRARY DESTINATION ${LIB_DIR} COMPONENT core)
|
|
||||||
|
get_target_property(_imported ${LINKED_LIB_REAL} IMPORTED)
|
||||||
|
if(_imported)
|
||||||
|
set(INSTALL_TYPE IMPORTED_RUNTIME_ARTIFACTS)
|
||||||
|
get_target_property(BOOST_DEPENDENCIES ${LINKED_LIB_REAL} INTERFACE_LINK_LIBRARIES)
|
||||||
|
foreach(BOOST_DEPENDENCY IN LISTS BOOST_DEPENDENCIES)
|
||||||
|
get_target_property(BOOST_DEPENDENCY_TYPE ${BOOST_DEPENDENCY} TYPE)
|
||||||
|
if(BOOST_DEPENDENCY_TYPE STREQUAL "SHARED_LIBRARY")
|
||||||
|
install(IMPORTED_RUNTIME_ARTIFACTS ${BOOST_DEPENDENCY} LIBRARY DESTINATION ${LIB_DIR} COMPONENT core)
|
||||||
|
endif()
|
||||||
|
endforeach()
|
||||||
|
else()
|
||||||
|
set(INSTALL_TYPE TARGETS)
|
||||||
|
endif()
|
||||||
|
install(${INSTALL_TYPE} ${LINKED_LIB_REAL} LIBRARY DESTINATION ${LIB_DIR} COMPONENT core)
|
||||||
endforeach()
|
endforeach()
|
||||||
endif()
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
Reference in New Issue
Block a user