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

[build] Allow using all GNU directories even if libdir is set #2450

Merged
merged 7 commits into from Sep 9, 2022

Commits on Sep 9, 2022

  1. [build] Add variable telling if DESTINATION is needed with install()

    It seems DESTINATION was only allowed to be omitted in 3.14
    
    https://cmake.org/cmake/help/v3.14/command/install.html#targets
    vs
    https://cmake.org/cmake/help/v3.13/command/install.html#targets
    
    After that the install destination directories can be deduced.
    robUx4 committed Sep 9, 2022
    Configuration menu
    Copy the full SHA
    90d911c View commit details
    Browse the repository at this point in the history
  2. [build] always use GNUInstallDirs

    It's possible to use GNUInstallDirs and allow the user to force some specific
    target folder. The values set by the user are not overriden in that case [1]:
    
    > If the includer does not define a value the above-shown default will be used
    > and the value will appear in the cache for editing by the user.
    
    With MSVC builds this doesn't change the default values used to install targets.
    
    [1] https://cmake.org/cmake/help/latest/module/GNUInstallDirs.html
    robUx4 committed Sep 9, 2022
    Configuration menu
    Copy the full SHA
    e76d61d View commit details
    Browse the repository at this point in the history
  3. [build] install scripts/srt-ffplay in the bin directory

    We don't need to use CMAKE_INSTALL_BINDIR which is not defined when
    GNUInstallDirs is not used. Using "TYPE BIN" will have the same result
    and will automatically pick the same as CMAKE_INSTALL_BINDIR.
    
    https://cmake.org/cmake/help/latest/command/install.html#installing-files
    robUx4 committed Sep 9, 2022
    Configuration menu
    Copy the full SHA
    8ab1d65 View commit details
    Browse the repository at this point in the history
  4. [build] don't force RUNTIME targets in CMAKE_INSTALL_BINDIR

    It is implied by the target type:
    
    > For regular executables, static libraries and shared libraries, the
    > DESTINATION argument is not required. For these target types, when
    > DESTINATION is omitted, a default destination will be taken from the
    > appropriate variable from GNUInstallDirs, or set to a built-in default value
    > if that variable is not defined.
    
    https://cmake.org/cmake/help/v3.14/command/install.html#targets
    robUx4 committed Sep 9, 2022
    Configuration menu
    Copy the full SHA
    7e15402 View commit details
    Browse the repository at this point in the history
  5. [build] use the default TARGETS installation folder when possible

    It is implied by each target type (static and dynamic libraries here):
    
    > For regular executables, static libraries and shared libraries, the
    > DESTINATION argument is not required. For these target types, when
    > DESTINATION is omitted, a default destination will be taken from the
    > appropriate variable from GNUInstallDirs, or set to a built-in default value
    > if that variable is not defined.
    
    https://cmake.org/cmake/help/v3.14/command/install.html#targets
    robUx4 committed Sep 9, 2022
    Configuration menu
    Copy the full SHA
    44f696e View commit details
    Browse the repository at this point in the history
  6. [build] only install pkg-config files if CMAKE_INSTALL_LIBDIR is avai…

    …lable
    
    It wouldn't make a lot of sense to expect pkg-config otherwise.
    
    We shouldn't install in CMAKE_INSTALL_LIBDIR if it's not set (it will install
    in /pkgconfig).
    robUx4 committed Sep 9, 2022
    Configuration menu
    Copy the full SHA
    150637c View commit details
    Browse the repository at this point in the history
  7. [build] only install headers if CMAKE_INSTALL_INCLUDEDIR is available

    We shouldn't install in CMAKE_INSTALL_INCLUDEDIR if it's not set (it will
    install them in /srt).
    robUx4 committed Sep 9, 2022
    Configuration menu
    Copy the full SHA
    3daf891 View commit details
    Browse the repository at this point in the history