Skip to content

Commit

Permalink
Merge pull request #3096 from WardF/fix-windows-install-package.wif
Browse files Browse the repository at this point in the history
Correct issue with .exe installer generation.
  • Loading branch information
WardF authored Feb 18, 2025
2 parents d19fca6 + 190a58f commit 69dabd6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1557,15 +1557,20 @@ endif()
# in the libdir.
##
if(MSVC)

if(NOT CMAKE_PREFIX_PATH OR CMAKE_PREFIX_PATH STREQUAL "")
set(CMAKE_PREFIX_PATH "$ENV{CMAKE_PREFIX_PATH}")
endif()

foreach(CPP ${CMAKE_PREFIX_PATH})
file(GLOB COPY_FILES ${CPP}/lib/*.lib)
file(GLOB COPY_FILES ${CPP}/*.lib ${CPP}/lib/*.lib)
endforeach()
install(FILES ${COPY_FILES}
DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT dependencies)

foreach(CPP ${CMAKE_PREFIX_PATH})
file(GLOB COPY_FILES ${CPP}/bin/*.dll)
file(GLOB COPY_FILES ${CPP}/*.dll)
endforeach()
string(REGEX REPLACE "msv[.*].dll" "" COPY_FILES "${COPY_FILES}")
install(FILES ${COPY_FILES}
Expand Down

0 comments on commit 69dabd6

Please sign in to comment.