CMake Error at cmake_install.cmake:(file) Multiple conflicting paths found for ...

Got it, this helps:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 55a3a3e..fd89f55 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -44,17 +44,13 @@ if(CMAKE_SKIP_INSTALL_RULES)
 endif()

 install(TARGETS ${PROJECT_NAME} RUNTIME COMPONENT ${PROJECT_NAME})
-install(IMPORTED_RUNTIME_ARTIFACTS ${PROJECT_NAME} RUNTIME_DEPENDENCY_SET runtime_dependency_set
-        RUNTIME
+install(IMPORTED_RUNTIME_ARTIFACTS ${PROJECT_NAME} RUNTIME_DEPENDENCY_SET
+        _dependency_set
+)
+# FIXME: CONFLICTING_DEPENDENCIES_PREFIX  _conflicts
+install(RUNTIME_DEPENDENCY_SET _dependency_set
+        POST_EXCLUDE_REGEXES "${CMAKE_INSTALL_PREFIX}/lib"
+        RUNTIME DESTINATION lib
 )
-install(RUNTIME_DEPENDENCY_SET runtime_dependency_set RUNTIME DESTINATION lib)

 include(CPack)
1 Like