CMakePackageConfigHelpers: Clarify Apple platform selection usage error

`generate_apple_platform_selection_file` requires `INSTALL_DESTINATION`.
This commit is contained in:
Brad King
2023-12-18 14:57:01 -05:00
parent 3b9586671c
commit dc5098429b
5 changed files with 19 additions and 0 deletions

View File

@@ -428,6 +428,10 @@ function(generate_apple_platform_selection_file _output_file)
set(_multi)
cmake_parse_arguments(PARSE_ARGV 0 _gpsf "${_options}" "${_single}" "${_multi}")
if(NOT _gpsf_INSTALL_DESTINATION)
message(FATAL_ERROR "No INSTALL_DESTINATION given to generate_apple_platform_selection_file()")
endif()
set(_have_relative 0)
foreach(_opt IN LISTS _config_file_options)
if(_gpsf_${_opt})