Page MenuHomePhabricator

Redesign application CPack system
Closed, ResolvedPublic

Description

Currently, when building all apps via MITK_BUILD_ALL_APPS the resulting installer will be called MITK-Diffusion-2011(...) as defined in
CPackOptionsDiffusion.cmake
instead of MITK-2012.02.99_(...) as defined in
mitkSetupVariables.cmake

Ideally, if only one app is build, the installer should take the name from that one, if two or more are build (or the ALL_APPS option is checked) a default name should be used.

Event Timeline

Probably an approach to solve this would be to move the cmake files around, that each file is within the application directory it belongs to and go on from there.

After some discussion the following idea presents itself:

Keep the default mitkSetupCPack.cmake
If desired one can create a separate CPackConfig.cmake.in and/or CPackOptions.cmake within the application directory
Within the top level CMakeLists.txt modify the "Installation" section to use a foreach loop over the AppList.cmake similar to the "Compile Utilities and set-up MITK variables" one

  • Check whether only one Application is activated
    • if no include nothing but mitkSetupCPack.cmake
    • if yes check whether that Application has CPack configuration files
      • if no include nothing but mitkSetupCPack.cmake
      • if yes include first mitkSetupCPack.cmake then the application specific files to overwrite changed default variables
    • add links to each application

[76384a]: Merge branch 'bug-11576-redesign-application-cpack-system'

Merged commits:

2012-04-12 11:55:22 Caspar Goch [b3bc5c]
Moved configuration below loop


2012-04-12 10:49:11 Caspar Goch [f0a13a]
Merge branch 'bug-11626-Change-mitkDiffusion-version-number' into bug-11576-redesign-application-cpack-system


2012-04-11 18:15:34 Caspar Goch [f0d627]
Made build all apps another reason for default


2012-04-11 17:27:42 Caspar Goch [fbddd2]
Moved Copyright


2012-04-11 16:18:07 Caspar Goch [cc6329]
Removed ExtApp Link from default config


2012-04-11 16:07:31 Caspar Goch [91f6ee]
Changed package system to use app level config

Currently only implemented for mitkDiffusion
Project file configuration might have to be moved out of the loop


2012-04-11 12:38:04 Caspar Goch [aca642]
Changed version number

Currently the project generator project template assumes that there will be only one app, which does not contain special configuration options.

Is this intended (as in, for advanced examples, see how MITK does it) or should this be changed to allow for App configuration or even multiple apps?

[f9e162]: Merge branch 'bug-11576-redesign-application-cpack-system'

Merged commits:

2012-04-12 15:25:35 Caspar Goch [09d55a]
Fix copyright path for mitkDiffusion

I looked through the changes and there are only minor changes in the top-level CMakeLists.txt I would make. Patch attached.

Oh, additionally, I removed all tabs (please: *no tabs*!) from the file and applied our "CMake style policy".

I applied your patch and set notepad++ to use no tabs (I thought I had already done that).

Have you decided whether I should add if(MITK_USE_BLUEBERRY) guards?

[35fac1]: Merge branch 'bug-11576-redesign-application-cpack-system'

Merged commits:

2012-04-13 11:38:31 Caspar Goch [0c275e]
Incorporated Saschas changes

[a2518f]: Merge branch 'bug-11576-redesign-application-cpack-system'

Merged commits:

2012-04-13 17:27:38 Sascha Zelzer [796ab2]
Do not include AppList.cmake if MITK_USE_BLUEBERRY is OFF.

Also generalized the way add_subdirectory is called for apps.

Will close. Reopen if necessary.