From e9c4fdf24690d113fdc38b81b6ab7b75c9c8b941 Mon Sep 17 00:00:00 2001 From: Joris Vaillant Date: Fri, 29 Nov 2024 10:57:47 +0100 Subject: [PATCH] cmake: Use IMPLIB instead of LOCATION on Windows --- hpp-fclConfig.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/hpp-fclConfig.cmake b/hpp-fclConfig.cmake index 1e2664285..b169f3c06 100644 --- a/hpp-fclConfig.cmake +++ b/hpp-fclConfig.cmake @@ -9,6 +9,10 @@ if(NOT TARGET hpp-fcl::hpp-fcl) target_link_libraries(hpp-fcl::hpp-fcl INTERFACE coal::coal) get_property(_cfg TARGET coal::coal PROPERTY IMPORTED_CONFIGURATIONS) get_property(_loc TARGET coal::coal PROPERTY "IMPORTED_LOCATION_${_cfg}") - set_property(TARGET hpp-fcl::hpp-fcl PROPERTY IMPORTED_LOCATION "${_loc}") + if(WIN32) + set_property(TARGET hpp-fcl::hpp-fcl PROPERTY IMPORTED_IMPLIB "${_loc}") + else() + set_property(TARGET hpp-fcl::hpp-fcl PROPERTY IMPORTED_LOCATION "${_loc}") + endif() target_compile_definitions(hpp-fcl::hpp-fcl INTERFACE COAL_BACKWARD_COMPATIBILITY_WITH_HPP_FCL) endif()