[waffle] [PATCH 2/4] cmake: Add cmake PackageConfig files
Jordan Justen
jordan.l.justen at intel.com
Sat Dec 27 15:23:55 PST 2014
On 2014-12-22 14:36:06, Dylan Baker wrote:
> This creates and installs a package version file and a package config
> file. These are used by find_package with the CONFIG option, and are
> roughly equivalent to pkgconfig, but is cmake specific rather than linux
> specific.
>
> Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
> ---
>
> CMakeLists.txt | 24 ++++++++++++++++++++++++
> cmake/Modules/.gitignore | 2 ++
> cmake/Modules/WaffleConfig.cmake.in | 13 +++++++++++++
> 3 files changed, 39 insertions(+)
> create mode 100644 cmake/Modules/.gitignore
> create mode 100644 cmake/Modules/WaffleConfig.cmake.in
>
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index bde8096..729ebc1 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -158,6 +158,30 @@ install(
> COMPONENT coredocs
> )
>
> +
> +# ------------------------------------------------------------------------------
> +# Create Package config and version files
> +# ------------------------------------------------------------------------------
> +
> +set(ConfigPackageLocation "${CMAKE_INSTALL_LIBDIR}/cmake/Waffle")
> +configure_file(cmake/Modules/WaffleConfig.cmake.in
> + cmake/Modules/WaffleConfig.cmake @ONLY)
> +
> +include(CMakePackageConfigHelpers)
> +write_basic_package_version_file(
> + "cmake/Modules/WaffleConfigVersion.cmake"
> + VERSION "${waffle_version}"
> + COMPATIBILITY AnyNewerVersion
> +)
> +
> +install(
> + FILES
> + "cmake/Modules/WaffleConfigVersion.cmake"
> + "cmake/Modules/WaffleConfig.cmake"
I needed:
+ "${CMAKE_BINARY_DIR}/cmake/Modules/WaffleConfigVersion.cmake"
+ "${CMAKE_BINARY_DIR}/cmake/Modules/WaffleConfig.cmake"
With that change, series:
Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
I tested this with your piglit branch on debian.
Chad, Any concerns with removing FindWaffle.cmake?
-Jordan
More information about the waffle
mailing list