New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for generating cmake files #3098

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
3 participants
@hardening
Contributor

hardening commented Feb 19, 2018

This new cmake module allows to generate cmake package files. This may ease the
porting for cmake projects that are exporting cmake package informations for other
depending projects. The module uses as much as possible the templates provided by
the cmake installation (and so cmake needs to be installed).

add support for generating cmake files
This new cmake module allows to generate cmake package files. This may ease the
porting for cmake projects that are exporting cmake package informations for other
depending projects. The module uses as much as possible the templates provided by
the cmake installation (and so cmake needs to be installed).

@hardening hardening force-pushed the hardening:cmake branch from b31c7aa to 6fa659a Feb 19, 2018

# Taken from https://github.com/Kitware/CMake/blob/master/Modules/CMakePackageConfigHelpers.cmake
PACKAGE_INIT_BASE = '''
####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######

This comment has been minimized.

@sarum9in

sarum9in Feb 19, 2018

Member

It looks a little bit misleading that this text is generated by configure_package_config_file(), it would make sense to mention meson.

This comment has been minimized.

@hardening

hardening Feb 19, 2018

Contributor

I just took what was done by the corresponding cmake script. Anyway I can make changes that would mention meson.

@jpakkane

This comment has been minimized.

Member

jpakkane commented Mar 25, 2018

This needs a proper test where a project is built and installed and then CMake is run on the result to ensure that the output works correctly. See for example the pkg-config usage tests in run_unittests.py.

@hardening

This comment has been minimized.

Contributor

hardening commented May 22, 2018

@jpakkane do you mean something that would test installed_files ?

@jpakkane

This comment has been minimized.

Member

jpakkane commented May 24, 2018

Yes. Something that, roughly:

  • builds and installs a library + headers + CMake definitions
  • runs CMake, uses it to find the dependency, builds a test executable that uses the library

Unrelated to this, is this something you personally need or more of a nice-to-have kind of thing?

@hardening

This comment has been minimized.

Contributor

hardening commented May 24, 2018

@jpakkane well both, I have a cmake based project that I'd like to migrate to meson (well in fact it's already done), but then there's other projects that depend on it and that also rely on cmake, so I need the cmake package files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment