1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-05-02 21:53:51 +00:00

Fix for install=off

This commit is contained in:
Henry Fredrick Schreiner 2020-01-09 08:33:34 -05:00 committed by Henry Schreiner
parent 0cc8806ec5
commit 7f47f9926f
2 changed files with 18 additions and 20 deletions

View File

@ -186,19 +186,16 @@ if(CLI11_INSTALL)
# Make an export target
install(TARGETS CLI11 EXPORT CLI11Targets)
endif()
# Use find_package on the installed package
# Since we have no custom code, we can directly write this
# to Config.cmake (otherwise we'd have a custom config and would
# import Targets.cmake
# Use find_package on the installed package
# Since we have no custom code, we can directly write this
# to Config.cmake (otherwise we'd have a custom config and would
# import Targets.cmake
# Add the version in a CMake readable way
configure_file("cmake/CLI11ConfigVersion.cmake.in"
# Add the version in a CMake readable way
configure_file("cmake/CLI11ConfigVersion.cmake.in"
"CLI11ConfigVersion.cmake" @ONLY)
# These installs only make sense for a local project
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
# Make version available in the install
install(FILES "${PROJECT_BINARY_DIR}/CLI11ConfigVersion.cmake"
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/CLI11)

View File

@ -31,6 +31,7 @@ jobs:
- script: git diff --exit-code --color
displayName: Check tidy
# TODO: Fix macOS error and windows warning in c++17 mode
- job: Native
strategy:
matrix: