[CMake] How to create an app bundle qt4 application

Alin M Elena alin.elena at qub.ac.uk
Wed May 7 13:16:42 EDT 2008


Hi,


I want to create a bundle for a  QT4 application.
I create the binaries and everything runs ok.

now I want to  add the QT4 libraries icons and other resources.
down is a snap of my CMakeList.txt that does that

My application needs a qt plugin too (iconengines). 
How can I add it correctly?

Alin

if(APPLE)
## install the icon for the bundle
  install(FILES "${CMAKE_SOURCE_DIR}/src/gui/icons/aten.icns"
        DESTINATION "${target_name}.app/Contents/Resources/")
  install(DIRECTORY  "${CMAKE_HOME_DIRECTORY}/data/"
     DESTINATION ${target_name}.app/Contents/SharedSupport/
     REGEX ".svn" EXCLUDE)
  install(FILES "${CMAKE_SOURCE_DIR}/src/gui/icons/aten.icns"
        DESTINATION . RENAME ".VolumeIcon.icns")
  install(FILES "${CMAKE_SOURCE_DIR}/src/gui/icons/background.png"
        DESTINATION .background/)
  install(FILES "${CMAKE_SOURCE_DIR}/COPYING"
         DESTINATION . RENAME .COPYING)
  install(FILES "${CMAKE_SOURCE_DIR}/Aten.DS_Store"
         DESTINATION . RENAME .DS_Store)
  INSTALL(CODE "set(input_file
        \"\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${target_name}.app/Contents/MacOS/${target_name}\")")
  INSTALL(SCRIPT "${CMAKE_SOURCE_DIR}/CMakeIngestOSXBundleLibraries.cmake")
endif(APPLE)






-- 
______________________________________________________________________ 
 "...if the universities will not study useless subjects, who will?" 
                           G. F. Fitzgerald, Nature, 45/46, 392 (1892)
______________________________________________________________________
Mr. Alin M. ELENA
Atomistic Simulation Centre
School of Mathematics and Physics
Queen's University Belfast
Office: +44 (0)28 9097 1428
Fax: +44 (0)28 9097 5359
http://titus.phy.qub.ac.uk/group/Alin/
alin.elena at yahoo.co.uk 
alin.elena at qub.ac.uk
______________________________________________________________________


More information about the CMake mailing list