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.
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to