Skip to content
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

Make corrosion_install install header files and export configurations #544

Merged
merged 10 commits into from
Sep 2, 2024

Commits on Sep 2, 2024

  1. Make corrosion_install support include directories

    Supports directories added with `target_include_directories` like
    normal.
    
    There is a slight oddity.
    Because of how install(DIRECTORY) works, we can't put the include
    directory inside `${CMAKE_INSTALL_PREFIX}/include`, since that would
    create `${CMAKE_INSTALL_PREFIX}/include/<include dir name>`.
    Instead we copy directly to the CMAKE_INSTALL_PREFIX, and then use
    whatever name the include directory had (hopefully just `include`).
    
    This means that when installing the path to include files will be
    
    -- Installing: /tmp/install/./include
    -- Installing: /tmp/install/./include/is_odd
    -- Installing: /tmp/install/./include/is_odd/is_odd.h
    
    Instead of just
    
    -- Installing: /tmp/install/include
    -- Installing: /tmp/install/include/is_odd
    -- Installing: /tmp/install/include/is_odd/is_odd.h
    Gtker authored and jschwe committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    6ea85a1 View commit details
    Browse the repository at this point in the history
  2. Add special case for FILE_SETS in corrosion_install

    This adds better `install` integration for targets with headers defined
    through target_sources. The PUBLIC_HEADER option can now be used to
    change the DIRECTORY.
    Gtker authored and jschwe committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    7d36fc5 View commit details
    Browse the repository at this point in the history
  3. Add EXPORT to corrosion_install

    This does an install(TARGETS EXPORT) and creates a file at
    ${CMAKE_BINARY_DIR}/corrosion/<export-name>TargetsCorrosion.cmake that
    contains the *-static and *-shared targets used by the main target.
    
    The examples use RustLib instead of ${PROJECT_NAME} for visual clarity.
    Gtker authored and jschwe committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    de1acc9 View commit details
    Browse the repository at this point in the history
  4. Add implib support to corrosion_install exports

    Gtker authored and jschwe committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    ceeeee7 View commit details
    Browse the repository at this point in the history
  5. Update docs for corrosion_install

    Co-authored-by: Jonathan Schwender <55576758+jschwe@users.noreply.github.com>
    gtker and jschwe committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    21bdfd8 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    907057a View commit details
    Browse the repository at this point in the history
  7. Add strings around paths in corrosion_install export file

    Gtker authored and jschwe committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    684eb57 View commit details
    Browse the repository at this point in the history
  8. Make corrosion_install only install HEADERS file set

    Gtker authored and jschwe committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    e300046 View commit details
    Browse the repository at this point in the history
  9. Move corrosion_install example into usages.md

    Gtker authored and jschwe committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    f183906 View commit details
    Browse the repository at this point in the history
  10. Add header file to install_lib test

    This is not actually part of the test.
    Gtker authored and jschwe committed Sep 2, 2024
    Configuration menu
    Copy the full SHA
    849474c View commit details
    Browse the repository at this point in the history