[CMake] cpack with macosx

David Cole david.cole at kitware.com
Thu Jul 31 07:48:01 EDT 2008


You also need to add an install rule for your executable with
INSTALL(TARGETS ...

"make install" should work first, then "make package" will work too.


HTH,
David


On Thu, Jul 31, 2008 at 12:00 AM, Michael Masters <mmasters at gmail.com>wrote:

> I'm trying to get cpack working with our build and I'm a newbie with
> cmake and cpack. Currently, I'm on MacOSX.
>
> These are the steps I've taken so far to get things working:
>
> 1. Added 'INCLUDE(CPack)' to the bottom of our top level CMakeLists.txt
> file.
> 2. 'cmake .' from the root directory.
> 3. 'make package' from the root directory.
>
> This seems to generate 4 artifacts for distribution:
> - dmg
> - sh
> - tar.gz
> - tar.bz2
>
> The problem I'm having is that I don't have the executable in any of
> the above artifacts. I'm not sure if this is a problem with mac or
> just a config problem on my end. We have the following in one of the
> CMakeLists.txt files in a subdirectory:
>
> IF (APPLE)
>    ....
>    ADD_EXECUTABLE(OpenNERO MACOSX_BUNDLE ${OpenNERO_sources}
> ${OpenNERO_headers})
>    ....
> ENDIF(APPLE)
>
> Any suggestions would be greatly appreciated.
>
> Thanks in advance,
> Mike
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080731/b5b30d14/attachment.htm>


More information about the CMake mailing list