[CMake] Problems with CPack and Mac OS X

Michael Wild themiwi at gmail.com
Thu Jan 6 15:45:05 EST 2011


On 01/06/2011 09:31 PM, NoRulez wrote:
> Hi,
> 
> I want to use the package generator PackageMaker.
> 
> If I run cpack from the command line I get the Error that my app couldn't be found (without .app)
> 
> I have a bundle created with add_executable(MyApp MACOSX_BUNDLE...)
> 
> In the cpack configuration I have 
> INSTALL(PROGRAMS "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/MyApp" DESTINATION /opt/MyApp COMPONENT MyApp)
> 
> Why it doesn't use MyApp.app? If I declare it, then the error appears that it is a directory
> 
> Thanks in advance
> 
> Best Regards
> NoRulez

For targets, always use the install(TARGET ...) signature:

install(TARGETS MyApp
  BUNDLE DESTINATION /opt/MyApp COMPONENT MyApp)

install(PROGRAMS ...) is intended for scripts (as the documentation
clearly states.)

Michael



More information about the CMake mailing list