[CMake] CPack and fixup_bundle
Simon Drouin
drouin.simon at gmail.com
Thu Mar 17 17:14:41 EDT 2011
I'm trying to use CPack to create a .tar.gz package on linux. I use
fixup_bundle from the bundle utility to copy and fix Qt libraries to the
bundle.
When I use simple 'make install', everything is installed properly in
directory specified by CMAKE_INSTALL_PREFIX. When I use CPack, the Qt
libraries are still copied to the CMAKE_INSTALL_PREFIX directory and not the
package's directory. Here's the code:
# install executable(s)
install( TARGETS ${exec_name} DESTINATION . )
# fixup the bundle
set( APPS ${CMAKE_INSTALL_PREFIX}/${exec_name} )
list( APPEND libSearchDirs ${QT_LIBRARY_DIR})
set( additionalLib ${qtsvgiconplugin} )
INSTALL(CODE "include(BundleUtilities)
fixup_bundle(\"${APPS}\" \"${additionalLib}\"
\"${libSearchDirs}\")" COMPONENT Runtime)
#================================
# Packaging
#================================
set( CPACK_PACKAGE_DESCRIPTION_SUMMARY "My test package")
set( CPACK_PACKAGE_NAME ${exec_name} )
set( CPACK_PACKAGE_CONTACT "John Smith")
set( CPACK_PACKAGE_VENDOR "Company inc.")
set( CPACK_PACKAGE_VERSION_MAJOR ${PROG_MAJOR_VERSION})
set( CPACK_PACKAGE_VERSION_MINOR ${PROG_MINOR_VERSION})
set( CPACK_PACKAGE_VERSION_PATCH ${PROG_PATCH_VERSION})
set( CPACK_GENERATOR "TGZ")
set( CPACK_PACKAGE_FILE_NAME
"${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-${CMAKE_SYSTEM_PROCESSOR}")
include(CPack)
Am I missing something?
s.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110317/8c78df96/attachment.htm>
More information about the CMake
mailing list