[CMake] CPack`ing a bunch of command line tools on OS/X

Torsten Robitzki Torsten at Robitzki.de
Fri Jun 28 05:49:06 EDT 2019


Hello,
I try to pack a bunch of command line tools (and some additional data files) into an OS/X installer. When the installer is running, it should install / copy the command line tools and adjust the PATH variable (or what ever mean that comes close, to make the tools available). I use a super build structure and after build and is done, I end up with a very simple structure:

  install
    |
    |\-bin
    |   |\-bjpaprog
    |   |\-bjpaserver
    |   |\-bootloader_client
    |   \-—create_package
    |
    \--firmware
        |\-bootloader.tfp
        |\-firmware.tfp
        \-—softdevice.tfp

I use TGZ and productbuild as CPack generators. The generated zip file contains all the files above. The generated pkg files, just starts the installer, but does nothing.

The CMakeLists.txt for the packing looks basically like this:

    cmake_minimum_required(VERSION 3.14)

    set(CPACK_PACKAGE_VENDOR "Torrox GmbH & Co KG")

    install(DIRECTORY ${INSTALL_DIR}/bin DESTINATION .)
    install(DIRECTORY ${INSTALL_DIR}/firmware DESTINATION .)

    set(CPACK_GENERATOR TGZ productbuild)

    include(CPack)


I have no clue, to as where to start. Any ideas, pointers, comments?

best regards,

Torsten


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Message signed with OpenPGP
URL: <https://cmake.org/pipermail/cmake/attachments/20190628/bdf2cc76/attachment.sig>


More information about the CMake mailing list