From 0790d5d03cf933c81d9435901a781d1829ce4793 Mon Sep 17 00:00:00 2001 From: Teemu Murtola Date: Thu, 14 Aug 2014 06:05:55 +0300 Subject: [PATCH] Fix CMake package config after recent version changes Combined merge of I49c5037 and I23ec2dc broke the build without any conflicts, since usage for a variable that was renamed in the first was added in the second. The version management logic in the package config still needs some extra thought, but that's better done separately to get the build fixed. Change-Id: I93db8c0c5b515bc73f8e4e10eae86d9fd049975d --- src/gromacs/InstallLibInfo.cmake | 3 --- src/gromacs/gromacs-config-version.cmake.cmakein | 2 +- src/gromacs/gromacs-config.cmake.cmakein | 1 + 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gromacs/InstallLibInfo.cmake b/src/gromacs/InstallLibInfo.cmake index 0635d666b3..58856f88ce 100644 --- a/src/gromacs/InstallLibInfo.cmake +++ b/src/gromacs/InstallLibInfo.cmake @@ -57,9 +57,6 @@ function (do_pkgconfig) endfunction() function (do_cmake_config) - # Remove -dev suffix and similar, since we need a numeric version. - # TODO: Make also the full version string available from somewhere. - string(REGEX REPLACE "-.*$" "" PACKAGE_VERSION ${PROJECT_VERSION}) # Install everything into a subdirectory, because # 1. CMake expects things to be there for CMAKE_PREFIX_PATH to work, and # 2. This nicely isolates files for different suffixes from each other. diff --git a/src/gromacs/gromacs-config-version.cmake.cmakein b/src/gromacs/gromacs-config-version.cmake.cmakein index c3d70cd9f8..c405ebb0a7 100644 --- a/src/gromacs/gromacs-config-version.cmake.cmakein +++ b/src/gromacs/gromacs-config-version.cmake.cmakein @@ -32,7 +32,7 @@ # To help us fund GROMACS development, we humbly ask that you cite # the research papers on the package. Check out http://www.gromacs.org. -set(PACKAGE_VERSION "@PACKAGE_VERSION@") +set(PACKAGE_VERSION "@GMX_VERSION@") if ("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}") set(PACKAGE_VERSION_COMPATIBLE FALSE) diff --git a/src/gromacs/gromacs-config.cmake.cmakein b/src/gromacs/gromacs-config.cmake.cmakein index 0d7f97d350..c7dfb0d8f7 100644 --- a/src/gromacs/gromacs-config.cmake.cmakein +++ b/src/gromacs/gromacs-config.cmake.cmakein @@ -81,6 +81,7 @@ set(GROMACS_CXX_COMPILER_VERSION "@CMAKE_CXX_COMPILER_VERSION@") include(FindPackageMessage) # The version info is set by CMake when it determines whether this file # is suitable (by calling the version file, which sets PACKAGE_VERSION). +# TODO: Make also the full version string available from somewhere. set(_gmx_info "${GROMACS_VERSION}") if (GROMACS_SUFFIX) set(_gmx_info "${_gmx_info} (suffix: ${GROMACS_SUFFIX})") -- 2.22.0