Hello everyone,
I'm new to cmake so this will be a, more or less, stupid question.
I'm creating an multiplatform application that is dependent on curl, Qt, and ffmpeg.
I'd like to link them statically.
I'd like to link them statically.
On Windows is the need to include the *.dll files. I tried to use fixup_bundle() for this purpose at install time.
This works like a charm. So no problem theire.
This works like a charm. So no problem theire.
The problem starts when I'd like to pack the application. For this I'm using WIX and 7ZIP.
In neither of the created installer are the *.dll included.
I'm not sure where the problem is.
This is my code:
set(RELATIV_INSTALL_DIRECTORY "bin")
install(TARGETS ${CMAKE_PROJECT_NAME}
DESTINATION ${RELATIV_INSTALL_DIRECTORY}
COMPONENT app)
install(TARGETS ${CMAKE_PROJECT_NAME}
DESTINATION ${RELATIV_INSTALL_DIRECTORY}
COMPONENT app)
# DIRS contains all directories the *dll files are located
set(executable_path "\${CMAKE_INSTALL_PREFIX}/${RELATIV_INSTALL_DIRECTORY}/${CMAKE_PROJECT_NAME}.exe")
set(executable_path "\${CMAKE_INSTALL_PREFIX}/${RELATIV_INSTALL_DIRECTORY}/${CMAKE_PROJECT_NAME}.exe")
install(CODE "
include (BundleUtilities)
fixup_bundle(\"${executable_path}\" \"\" \"${DIRS}\")
"
COMPONENT app)
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_WIX_UI_DIALOG "${CMAKE_CURRENT_SOURCE_DIR}/res/windows/welcome.bmp")
# set(CPACK_WIX_PRODUCT_ICON "${CMAKE_CURRENT_SOURCE_DIR}/res/windows/Logo.ico")
set(CPACK_WIX_UI_BANNER "${CMAKE_CURRENT_SOURCE_DIR}/res/windows/header.bmp")
set(CPACK_GENERATOR WIX;7Z)
endif()
include(CPack)
I'm not sure why it won't show in the geerated installers.
I'm not sure why it won't show in the geerated installers.
Best regards,
Seabstian
Seabstian
-- 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