Commit 7f47f9926fe5b05dc11b28cb8d20d9b69faf639a

Authored by Henry Fredrick Schreiner
Committed by Henry Schreiner
1 parent 0cc8806e

Fix for install=off

CMakeLists.txt
... ... @@ -181,38 +181,35 @@ endif()
181 181  
182 182 # This folder should be installed
183 183 if(CLI11_INSTALL)
184   - install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/
185   - DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
  184 + install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/
  185 + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
186 186  
187   - # Make an export target
188   - install(TARGETS CLI11 EXPORT CLI11Targets)
189   -endif()
  187 + # Make an export target
  188 + install(TARGETS CLI11 EXPORT CLI11Targets)
190 189  
191   -# Use find_package on the installed package
192   -# Since we have no custom code, we can directly write this
193   -# to Config.cmake (otherwise we'd have a custom config and would
194   -# import Targets.cmake
  190 + # Use find_package on the installed package
  191 + # Since we have no custom code, we can directly write this
  192 + # to Config.cmake (otherwise we'd have a custom config and would
  193 + # import Targets.cmake
195 194  
196   -# Add the version in a CMake readable way
197   -configure_file("cmake/CLI11ConfigVersion.cmake.in"
198   - "CLI11ConfigVersion.cmake" @ONLY)
  195 + # Add the version in a CMake readable way
  196 + configure_file("cmake/CLI11ConfigVersion.cmake.in"
  197 + "CLI11ConfigVersion.cmake" @ONLY)
199 198  
200   -# These installs only make sense for a local project
201   -if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
202 199 # Make version available in the install
203 200 install(FILES "${PROJECT_BINARY_DIR}/CLI11ConfigVersion.cmake"
204   - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/CLI11)
  201 + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/CLI11)
205 202  
206 203 # Install the export target as a file
207 204 install(EXPORT CLI11Targets
208   - FILE CLI11Config.cmake
209   - NAMESPACE CLI11::
210   - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/CLI11)
  205 + FILE CLI11Config.cmake
  206 + NAMESPACE CLI11::
  207 + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/CLI11)
211 208  
212 209 # Use find_package on the installed package
213 210 export(TARGETS CLI11
214   - NAMESPACE CLI11::
215   - FILE CLI11Targets.cmake)
  211 + NAMESPACE CLI11::
  212 + FILE CLI11Targets.cmake)
216 213  
217 214 # Register in the user cmake package registry
218 215 export(PACKAGE CLI11)
... ...
azure-pipelines.yml
... ... @@ -31,6 +31,7 @@ jobs:
31 31 - script: git diff --exit-code --color
32 32 displayName: Check tidy
33 33  
  34 +# TODO: Fix macOS error and windows warning in c++17 mode
34 35 - job: Native
35 36 strategy:
36 37 matrix:
... ...