Hello,
I've got a small Problem with Cpack and BundleUtilities on Windows.
At the moment I want to copy *.dll file at install time and also include these in the created "installer".
When I install the program through VisualStudio, everything works like a charm. But when I invoke cpack via the command prompt, no dll files appear in the "Installer". I am not sure what is happening.
My code to archive this looks like this:
set(RELATIV_INSTALL_DIRECTORY "bin")
install(TARGETS ${CMAKE_PROJECT_NAME}
RUNTIME DESTINATION ${RELATIV_INSTALL_DIRECTORY}
COMPONENT app)
if(WIN32)
#set Variable "dirs"
set(executable_path "\${CMAKE_INSTALL_PREFIX}/${RELATIV_INSTALL_DIRECTORY}/${CMAKE_PROJECT_NAME}.exe")
endif()
endif()
install(CODE "
include (BundleUtilities)
fixup_bundle(\"${executable_path}\" \"\" \"${DIRS}\")
"
COMPONENT app
)
set(CPACK_OUTPUT_FILE_PREFIX "${CMAKE_BINARY_DIR}/package")
set(CPACK_PACKAGE_NAME "${CMAKE_PROJECT_NAME}")
set(CPACK_PACKAGE_VENDOR "${COMPANY_NAME}")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Installer for ${CMAKE_PROJECT_NAME}.")
set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "company/${CMAKE_PROJECT_NAME}")
set(CPACK_PACKAGE_VENDOR "${COMPANY_NAME}")
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Installer for ${CMAKE_PROJECT_NAME}.")
set(CPACK_PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}")
set(CPACK_PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}")
set(CPACK_PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}")
set(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
set(CPACK_PACKAGE_INSTALL_DIRECTORY "company/${CMAKE_PROJECT_NAME}")
set(CPACK_COMPONENTS_ALL app)
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/license.txt")
if(WIN32)
set(CPACK_GENERATOR WIX;7Z)
endif()
include(CPack)
I hope someone is able to help me with this issue.
Best regards
Sebastian
-- Powered by kitware.com/cmake
Kitware offers various services to support the CMake community. For more information on each offering, please visit https://cmake.org/services Visit other Kitware open-source projects at https://www.kitware.com/platforms Follow this link to subscribe/unsubscribe: https://cmake.org/mailman/listinfo/cmake This mailing list is deprecated in favor of https://discourse.cmake.org