|
@@ -151,11 +151,11 @@ if(LIBIGL_WITH_CGAL)
|
|
endif()
|
|
endif()
|
|
|
|
|
|
# Helper function for `igl_copy_cgal_dll()`
|
|
# Helper function for `igl_copy_cgal_dll()`
|
|
-function(igl_copy_imported_locations src_target dst_target)
|
|
|
|
|
|
+function(igl_copy_imported_dll src_target dst_target)
|
|
get_target_property(configurations ${src_target} IMPORTED_CONFIGURATIONS)
|
|
get_target_property(configurations ${src_target} IMPORTED_CONFIGURATIONS)
|
|
foreach(config ${configurations})
|
|
foreach(config ${configurations})
|
|
get_target_property(location ${src_target} IMPORTED_LOCATION_${config})
|
|
get_target_property(location ${src_target} IMPORTED_LOCATION_${config})
|
|
- if(EXISTS "${location}")
|
|
|
|
|
|
+ if(EXISTS "${location}" AND location MATCHES "^.*\\.dll$")
|
|
add_custom_command(TARGET ${dst_target} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${location}" $<TARGET_FILE_DIR:${dst_target}>)
|
|
add_custom_command(TARGET ${dst_target} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different "${location}" $<TARGET_FILE_DIR:${dst_target}>)
|
|
endif()
|
|
endif()
|
|
endforeach()
|
|
endforeach()
|
|
@@ -164,8 +164,8 @@ endfunction()
|
|
# Convenient functions to copy CGAL dlls into a target (executable) destination folder (for Windows)
|
|
# Convenient functions to copy CGAL dlls into a target (executable) destination folder (for Windows)
|
|
function(igl_copy_cgal_dll target)
|
|
function(igl_copy_cgal_dll target)
|
|
if(WIN32 AND LIBIGL_WITH_CGAL)
|
|
if(WIN32 AND LIBIGL_WITH_CGAL)
|
|
- igl_copy_imported_locations(CGAL::CGAL ${target})
|
|
|
|
- igl_copy_imported_locations(CGAL::CGAL_Core ${target})
|
|
|
|
|
|
+ igl_copy_imported_dll(CGAL::CGAL ${target})
|
|
|
|
+ igl_copy_imported_dll(CGAL::CGAL_Core ${target})
|
|
endif()
|
|
endif()
|
|
endfunction()
|
|
endfunction()
|
|
|
|
|