Merge branch 'release-2020' into master
[alexxy/gromacs.git] / src / gromacs / gromacs-config.cmake.cmakein
index 7ea1facd85902c3710f1074398a73ea099b8200f..df67591a02ddbf75facb9ca5fe9dfd607415e5cf 100644 (file)
@@ -1,7 +1,7 @@
 #
 # This file is part of the GROMACS molecular simulation package.
 #
-# Copyright (c) 2014,2016,2019, by the GROMACS development team, led by
+# Copyright (c) 2014,2016,2019,2020, by the GROMACS development team, led by
 # Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
 # and including many others, as listed in the AUTHORS file in the
 # top-level source directory and at http://www.gromacs.org.
@@ -57,10 +57,14 @@ endif()
 include(${_gmx_import_file})
 unset(_gmx_import_file)
 
-get_target_property(_libs libgromacs INTERFACE_LINK_LIBRARIES)
+get_target_property(_libs Gromacs::libgromacs INTERFACE_LINK_LIBRARIES)
 if (_libs MATCHES "tng_io::tng_io")
     include(CMakeFindDependencyMacro)
-    find_dependency(TNG_IO)
+    find_dependency(TNG_IO REQUIRED)
+endif()
+if (_libs MATCHES "OpenMP::OpenMP_CXX")
+    include(CMakeFindDependencyMacro)
+    find_dependency(OpenMP REQUIRED)
 endif()
 if (_libs MATCHES "OpenMP::OpenMP_CXX")
     include(CMakeFindDependencyMacro)
@@ -77,7 +81,7 @@ foreach (_dir ${_include_dirs})
         list(APPEND GROMACS_INCLUDE_DIRS ${_gmx_root_dir}/${_dir})
     endif()
 endforeach()
-set(GROMACS_LIBRARIES libgromacs)
+set(GROMACS_LIBRARIES Gromacs::libgromacs)
 set(GROMACS_DEFINITIONS @INSTALLED_HEADER_DEFINITIONS@)
 set(GROMACS_IS_DOUBLE @GMX_DOUBLE@)
 if (DEFINED GROMACS_SUFFIX AND NOT "${GROMACS_SUFFIX}" STREQUAL "@GMX_LIBS_SUFFIX@")