Skip to content
This repository has been archived by the owner on Aug 5, 2022. It is now read-only.

packaging: define installation components #367

Merged
merged 3 commits into from
May 10, 2016

Conversation

dawagner
Copy link
Contributor

@dawagner dawagner commented May 4, 2016

The following components are declared:

  • runtime (libparameter and libremote-processor);
  • dev (everything necessary to develop a plugin or a client: headers, cmake
    package files, ...);
  • c (the C bindings, i.e. libcparameter);
  • cdev (everything necessary to develop a client using the C bindings);
  • python (the Python bindings);
  • eng (the various tools, XML schemas, ...);
  • runtime-deps (on windows only: the msvc redistributable files).

Then, CPack can be used to generate separate packages.

@@           master       #367   diff @@
========================================
Files         211        211
Lines        7169       7169
Methods         0          0
Branches        0          0
========================================
Hits         5760       5760
Misses       1409       1409
Partials        0          0

Powered by Codecov. Last updated by 1d51444...a62ad87

$ help test
-a FILE        True if file exists.
...
-x FILE        True if the file is executable by you.
...

  

There are two ways of propagating the post-install include requirements: either
by adding an 'INCLUDES DESTINATION' argument to the 'install' directive or by
adding an 'INTERFACE' argument to the 'target_include_directories' and using a
generator expression to make it active at install-time only. This patch prefers
changes for the latter since it is consistent with how build-time requirements
are propagated.

Signed-off-by: David Wagner <[email protected]>
@codecov-io
Copy link

codecov-io commented May 4, 2016

Current coverage is 80.35%

Merging #367 into master will increase coverage by +<.01%

@@           master       #367   diff @@
========================================
  Files         211        211          
  Lines        7169       7169          
  Methods         0          0          
  Branches        0          0          
========================================
  Hits         5760       5760          
  Misses       1409       1409          
  Partials        0          0          

Powered by Codecov. Last updated by 1d51444...a62ad87

@dawagner
Copy link
Contributor Author

dawagner commented May 6, 2016

@krocard @tcahuzax @terahxluna Please review.

# Check that all installed files are in a component (no "unspecified
# component" archive created)
- (cd build && cpack -G TGZ -D CPACK_ARCHIVE_COMPONENT_INSTALL=ON &&
[ ! -x '*-Unspecified.tar.gz' ])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you want to use -a instead of -x

$ help test
    -a FILE        True if file exists.
   ...
    -x FILE        True if the file is executable by you.
   ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops, you're right. I changed my mind halfway through...

'install' commands can receive 'COMPONENT' arguments (one per target file
kind). Upon request, CMake can install only the files associated to a given
component. This will be used to generate separate archives/pacakges/installers
with CPack.

The following components are declared:
- runtime (libparameter and libremote-processor);
- dev (everything necessary to develop a plugin or a client: headers, cmake
       package files, ...);
- c (the C bindings, i.e. libcparameter);
- cdev (everything necessary to develop a client using the C bindings);
- python (the Python bindings);
- eng (the various tools, XML schemas, ...);
- runtime-deps (on windows only: the msvc redistributable files).

Unfortunately, per-component debian package generation and automatic dependency
discovery (using shlibdeps) do not work together before CMake 3.4. Also,
per-component debian package dependency declaration has been added in CMake
3.4, so it is not possible yet to declare, for instance, that the 'dev' package
depends on the 'runtime' package.

However, the following works and generates one archive for each component:

    cpack -G TGZ -D CPACK_ARCHIVE_COMPONENT_INSTALL=ON

Signed-off-by: David Wagner <[email protected]>
@dawagner dawagner merged commit d7b718a into intel:master May 10, 2016
@dawagner dawagner deleted the cpack-components branch May 10, 2016 14:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants