Fix CMake package config after recent version changes
authorTeemu Murtola <teemu.murtola@gmail.com>
Thu, 14 Aug 2014 03:05:55 +0000 (06:05 +0300)
committerTeemu Murtola <teemu.murtola@gmail.com>
Thu, 14 Aug 2014 03:05:55 +0000 (06:05 +0300)
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
src/gromacs/gromacs-config-version.cmake.cmakein
src/gromacs/gromacs-config.cmake.cmakein

index 0635d666b357c02875842a59be91df341ab6c4c9..58856f88ce4b807452fbb5df5ec270d6a94c0bee 100644 (file)
@@ -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.
index c3d70cd9f8d3a564e42934b1c00dee6a54d29ad3..c405ebb0a7b49352a4a83680789ce663f5bb43e8 100644 (file)
@@ -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)
index 0d7f97d350ad6bb093dbeaa79174026df07f6945..c7dfb0d8f7d4ecd23c265875adbaa599f1fcfda7 100644 (file)
@@ -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})")