File tree Expand file tree Collapse file tree 2 files changed +7
-15
lines changed
Expand file tree Collapse file tree 2 files changed +7
-15
lines changed Original file line number Diff line number Diff line change @@ -91,7 +91,11 @@ write_basic_package_version_file(
9191# Use variables:
9292# * targets_export_name
9393# * PROJECT_NAME
94- configure_file ("cmake/Config.cmake.in" "${project_config} " @ONLY)
94+ configure_package_config_file(
95+ "cmake/Config.cmake.in"
96+ "${project_config} "
97+ INSTALL_DESTINATION "${config_install_dir} "
98+ )
9599
96100# Targets:
97101# * <prefix>/lib/libbar.a
Original file line number Diff line number Diff line change 1- set (_package_components "${@PROJECT_NAME@_FIND_COMPONENTS}" )
2- string (COMPARE NOTEQUAL "${_package_components} " "" _has_components)
3- if (_has_components)
4- set (_error_message "Package `@PROJECT_NAME@` has no components:" )
5- foreach (x ${_package_components} )
6- set (_error_message "${_error_message} \n ${x} " )
7- endforeach ()
8- set (
9- _error_message
10- "${_error_message} \n Please check your `find_package` call."
11- )
12-
13- message (FATAL_ERROR "${_error_message} " )
14- endif ()
1+ @PACKAGE_INIT@
152
163include ("${CMAKE_CURRENT_LIST_DIR} /@targets_export_name@.cmake" )
4+ check_required_components("@PROJECT_NAME@" )
You can’t perform that action at this time.
0 commit comments