#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+# Copyright (c) 2009,2010,2011,2012,2013,2014,2015,2016,2017,2018, 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.
set(GMX_SHARED_LINKER_FLAGS ${GMX_SHARED_LINKER_FLAGS} ${OpenMP_SHARED_LINKER_FLAGS})
endif()
+
########################################################################
# Specify install locations
########################################################################
# Use GNUInstallDirs to set paths on multiarch systems.
include(GNUInstallDirs)
-# Customization for the installation tree paths.
-set(GMX_LIB_INSTALL_DIR ${CMAKE_INSTALL_LIBDIR} CACHE STRING
- "Library installation directory (default: ${CMAKE_INSTALL_LIBDIR})")
-set(GMX_DATA_INSTALL_DIR gromacs CACHE STRING
- "Data installation directory under share/ (default: gromacs)")
-mark_as_advanced(GMX_LIB_INSTALL_DIR GMX_DATA_INSTALL_DIR)
-
-# These variables are used internally to provide a central location for
-# customizing the install locations.
-set(LIB_INSTALL_DIR ${GMX_LIB_INSTALL_DIR})
-set(BIN_INSTALL_DIR bin)
-# This variable also gets written into config.h for use in finding the data
-# directories.
-set(DATA_INSTALL_DIR share/${GMX_DATA_INSTALL_DIR})
-set(MAN_INSTALL_DIR share/man)
+set(GMX_INSTALL_DATASUBDIR "gromacs" CACHE STRING "Subdirectory for GROMACS data under CMAKE_INSTALL_DATADIR")
+mark_as_advanced(GMX_INSTALL_DATASUBDIR)
+
+# Internal convenience so we do not have to join two path segments in the code
+set(GMX_INSTALL_GMXDATADIR ${CMAKE_INSTALL_DATADIR}/${GMX_INSTALL_DATASUBDIR})
+
# If the nesting level wrt. the installation root is changed,
# gromacs-config.cmake.cmakein needs to be adapted.
-set(CMAKE_INSTALL_DIR share/cmake)
+set(GMX_INSTALL_CMAKEDIR ${CMAKE_INSTALL_DATAROOTDIR}/cmake)
+
# TODO: Make GMXRC adapt if this is changed
-set(PKGCONFIG_INSTALL_DIR ${LIB_INSTALL_DIR}/pkgconfig)
-set(OCL_INSTALL_DIR ${DATA_INSTALL_DIR}/opencl)
-set(INCL_INSTALL_DIR include)
+set(GMX_INSTALL_PKGCONFIGDIR ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+set(GMX_INSTALL_OCLDIR ${GMX_INSTALL_GMXDATADIR}/opencl)
-list(APPEND INSTALLED_HEADER_INCLUDE_DIRS ${INCL_INSTALL_DIR})
+list(APPEND INSTALLED_HEADER_INCLUDE_DIRS ${CMAKE_INSTALL_INCLUDEDIR})
# Binary and library suffix options
include(gmxManageSuffixes)
# install to lib/, then the installation RPATH works also in the build
# tree. This makes installation slightly faster (no need to rewrite the
# RPATHs), and makes the binaries in the build tree relocatable.
- if(GMX_LIB_INSTALL_DIR STREQUAL "lib")
+ if(CMAKE_INSTALL_LIBDIR STREQUAL "lib")
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
if(POLICY CMP0068)
cmake_policy(SET CMP0068 NEW) # From CMake-3.9
# Set the RPATH as relative to the executable location to make the
# binaries relocatable.
if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") #Assume OS X >=10.5
- set(CMAKE_INSTALL_RPATH "@executable_path/../${GMX_LIB_INSTALL_DIR}")
+ set(CMAKE_INSTALL_RPATH "@executable_path/../${CMAKE_INSTALL_LIBDIR}")
set(CMAKE_INSTALL_NAME_DIR ${CMAKE_INSTALL_RPATH})
else()
- set(CMAKE_INSTALL_RPATH "\$ORIGIN/../${GMX_LIB_INSTALL_DIR}")
+ set(CMAKE_INSTALL_RPATH "\$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
endif()
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
set(CMAKE_MACOSX_RPATH 1)
#COPYING file: Only necessary for binary distributions.
#Simpler to always install.
-install(FILES COPYING DESTINATION ${DATA_INSTALL_DIR} COMPONENT data)
+install(FILES COPYING DESTINATION ${GMX_INSTALL_GMXDATADIR} COMPONENT data)
if (GMX_BUILD_FOR_COVERAGE)
# Code heavy with asserts makes conditional coverage close to useless metric,
-#!/usr/bin/env python2
+#!/usr/bin/env python
#
# This file is part of the GROMACS molecular simulation package.
#
# Trailing slash on directory is significant for
# install(DIRECTORY). See CMake docs.
install(DIRECTORY ${MAN_PAGE_DIR}/
- DESTINATION ${MAN_INSTALL_DIR}/man1
+ DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
COMPONENT man OPTIONAL
FILES_MATCHING PATTERN "*.1")
endif()
subcounters which are available.
Defaults to ``OFF``.
-.. cmake:: GMX_DATA_INSTALL_DIR
+.. cmake:: GMX_INSTALL_DATASUBDIR
- Sets the directory under :file:`share/` where data files are installed.
- The default is ``gromacs``, which puts the files under
- file:`share/gromacs/`.
+ Sets the subdirectory under CMAKE_INSTALL_DATADIR where GROMACS-specific
+ read-only architecture-independent data files are installed. The default
+ is ``gromacs``, which means the files will go under ``share/gromacs``.
+ To alter the ``share`` part, change CMAKE_INSTALL_DATADIR.
See :doc:`relocatable-binaries` for how this influences the build.
.. cmake:: GMX_DOUBLE
Pass additional CUDA-only compiler flags to clang using this variable.
-.. cmake:: GMX_LIB_INSTALL_DIR
+.. cmake:: CMAKE_INSTALL_LIBDIR
Sets the installation directory for libraries (default is determined by
standard CMake package ``GNUInstallDirs``).
contains :file:`share/{gromacs}/top/gurgle.dat`, this directory is returned
as the installation prefix. The file name ``gurgle.dat`` and the location
are considered unique enough to ensure that the correct directory has been
- found. The installation directory for the data files can be customized
- during CMake configuration by setting ``GMX_DATA_INSTALL_DIR``, which
- affects the *gromacs* part in the above path (both in the installation
- structure and in this search logic).
+ found. The installation directory for read-only architecture-independent
+ data files can be customized during CMake configuration by setting
+ ``CMAKE_INSTALL_DATADIR``, and the subdirectory under this that hosts the
+ GROMACS-specific data is set by ``GMX_INSTALL_DATASUBDIR``.
Note that this search does not resolve symbolic links or normalize the input
path beforehand: if there are ``..`` components *and* symbolic links in the
The standard location for executables and some scripts.
Some of the scripts hardcode the absolute installation prefix, which needs
to be changed if the scripts are relocated.
+ The name of the directory can be changed using ``CMAKE_INSTALL_BINDIR`` CMake
+ variable.
``include/gromacs/``
The standard location for installed headers.
``lib/``
The standard location for libraries. The default depends on the system, and
is determined by CMake.
- The name of the directory can be changed using ``GMX_LIB_INSTALL_DIR`` CMake
+ The name of the directory can be changed using ``CMAKE_INSTALL_LIBDIR`` CMake
variable.
``lib/pkgconfig/``
Information about the installed ``libgromacs`` library for ``pkg-config`` is
``share/cmake/``
CMake package configuration files are installed here.
``share/gromacs/``
- Various data files and some documentation go here.
- The ``gromacs`` part can be changed using ``GMX_DATA_INSTALL_DIR``. Using this
- CMake variable is the preferred way of changing the installation path for
+ Various data files and some documentation go here. The first part can
+ be changed using ``CMAKE_INSTALL_DATADIR``, and the second by using
+ ``GMX_INSTALL_DATASUBDIR`` Using these CMake variables is the preferred
+ way of changing the installation path for
``share/gromacs/top/``, since the path to this directory is built into
``libgromacs`` as well as some scripts, both as a relative and as an absolute
path (the latter as a fallback if everything else fails).
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2010,2014, by the GROMACS development team, led by
+# Copyright (c) 2010,2014,2018, 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.
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/GMXRC.csh.cmakein ${CMAKE_CURRENT_BINARY_DIR}/GMXRC.csh @ONLY)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/GMXRC.zsh.cmakein ${CMAKE_CURRENT_BINARY_DIR}/GMXRC.zsh @ONLY)
-install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/GMXRC DESTINATION ${BIN_INSTALL_DIR} COMPONENT runtime)
-install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/GMXRC.bash DESTINATION ${BIN_INSTALL_DIR} COMPONENT runtime)
-install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/GMXRC.zsh DESTINATION ${BIN_INSTALL_DIR} COMPONENT runtime)
-install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/GMXRC.csh DESTINATION ${BIN_INSTALL_DIR} COMPONENT runtime)
+install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/GMXRC DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime)
+install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/GMXRC.bash DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime)
+install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/GMXRC.zsh DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime)
+install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/GMXRC.csh DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime)
-install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/demux.pl DESTINATION ${BIN_INSTALL_DIR} COMPONENT runtime)
-install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/xplor2gmx.pl DESTINATION ${BIN_INSTALL_DIR} COMPONENT runtime)
+install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/demux.pl DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime)
+install(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/xplor2gmx.pl DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime)
# If you move gromacs, change the first line.
##########################################################
GMXPREFIX=@CMAKE_INSTALL_PREFIX@
-GMXBIN=${GMXPREFIX}/@BIN_INSTALL_DIR@
-GMXLDLIB=${GMXPREFIX}/@LIB_INSTALL_DIR@
-GMXMAN=${GMXPREFIX}/@MAN_INSTALL_DIR@
-GMXDATA=${GMXPREFIX}/@DATA_INSTALL_DIR@
+GMXBIN=${GMXPREFIX}/@CMAKE_INSTALL_BINDIR@
+GMXLDLIB=${GMXPREFIX}/@CMAKE_INSTALL_LIBDIR@
+GMXMAN=${GMXPREFIX}/@CMAKE_INSTALL_MANDIR@
+GMXDATA=${GMXPREFIX}/@GMX_INSTALL_GMXDATADIR@
GROMACS_DIR=${GMXPREFIX}
LD_LIBRARY_PATH=${GMXLDLIB}${LD_LIBRARY_PATH:+:}${LD_LIBRARY_PATH}
echo $shell | grep -q csh && goto CSH
# if we got here, shell is bsh/bash/zsh/ksh
-. @CMAKE_INSTALL_PREFIX@/@BIN_INSTALL_DIR@/GMXRC.bash
+. @CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/GMXRC.bash
return
# csh/tcsh jump here
CSH:
-source @CMAKE_INSTALL_PREFIX@/@BIN_INSTALL_DIR@/GMXRC.csh
+source @CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/GMXRC.csh
# If you move gromacs, change the first line.
##########################################################
setenv GMXPREFIX @CMAKE_INSTALL_PREFIX@
-setenv GMXBIN ${GMXPREFIX}/@BIN_INSTALL_DIR@
-setenv GMXLDLIB ${GMXPREFIX}/@LIB_INSTALL_DIR@
-setenv GMXMAN ${GMXPREFIX}/@MAN_INSTALL_DIR@
-setenv GMXDATA ${GMXPREFIX}/@DATA_INSTALL_DIR@
+setenv GMXBIN ${GMXPREFIX}/@CMAKE_INSTALL_BINDIR@
+setenv GMXLDLIB ${GMXPREFIX}/@CMAKE_INSTALL_LIBDIR@
+setenv GMXMAN ${GMXPREFIX}/@CMAKE_INSTALL_MANDIR@
+setenv GMXDATA ${GMXPREFIX}/@GMX_INSTALL_GMXDATADIR@
setenv GROMACS_DIR ${GMXPREFIX}
#make them begin with :
# zsh configuration file for Gromacs
# only kept for backwards compatibility
-source @CMAKE_INSTALL_PREFIX@/@BIN_INSTALL_DIR@/GMXRC.bash
+source @CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/GMXRC.bash
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2009,2010,2011,2012,2013,2014, by the GROMACS development team, led by
+# Copyright (c) 2009,2010,2011,2012,2013,2014,2018, 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.
add_subdirectory(template)
install(FILES README.tutor README_FreeEnergyModifications.txt
- DESTINATION ${DATA_INSTALL_DIR}
+ DESTINATION ${GMX_INSTALL_GMXDATADIR}
COMPONENT data)
install(DIRECTORY top
- DESTINATION ${DATA_INSTALL_DIR}
+ DESTINATION ${GMX_INSTALL_GMXDATADIR}
COMPONENT data
PATTERN "*~" EXCLUDE)
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2011,2012,2014,2016, by the GROMACS development team, led by
+# Copyright (c) 2011,2012,2014,2016,2018, 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.
configure_file(README.cmakein README @ONLY)
install(FILES CMakeLists.txt.template
- DESTINATION ${DATA_INSTALL_DIR}/template
+ DESTINATION ${GMX_INSTALL_GMXDATADIR}/template
RENAME CMakeLists.txt
COMPONENT development)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/README template.cpp Makefile.pkg
- DESTINATION ${DATA_INSTALL_DIR}/template
+ DESTINATION ${GMX_INSTALL_GMXDATADIR}/template
COMPONENT development)
install(FILES cmake/FindGROMACS.cmake
- DESTINATION ${DATA_INSTALL_DIR}/template/cmake
+ DESTINATION ${GMX_INSTALL_GMXDATADIR}/template/cmake
COMPONENT development)
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2017,2018, 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.
/** Binary directory for the build */
#define CMAKE_BINARY_DIR "@CMAKE_BINARY_DIR@"
-/** Location of data files in the installation directory */
-#define DATA_INSTALL_DIR "@DATA_INSTALL_DIR@"
+/** Location of GROMACS-specific data files */
+#define GMX_INSTALL_GMXDATADIR "@GMX_INSTALL_GMXDATADIR@"
/** CUDA compiler version information */
#define CUDA_COMPILER_INFO "@CUDA_COMPILER_INFO@"
#cmakedefine01 HAVE_NVML
/* Define relative path to OpenCL kernels */
-#define OCL_INSTALL_DIR "@OCL_INSTALL_DIR@"
+#define GMX_INSTALL_OCLDIR "@GMX_INSTALL_OCLDIR@"
/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
#cmakedefine01 HAVE_FSEEKO
if (NOT GMX_BUILD_MDRUN_ONLY)
file(RELATIVE_PATH _dest ${PROJECT_SOURCE_DIR}/src ${CMAKE_CURRENT_LIST_DIR})
install(FILES ${ARGN}
- DESTINATION "${INCL_INSTALL_DIR}/${_dest}"
+ DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${_dest}"
COMPONENT development)
endif()
_gmx_add_files_to_property(GMX_INSTALLED_HEADERS ${ARGN})
if (NOT GMX_BUILD_MDRUN_ONLY OR BUILD_SHARED_LIBS)
install(TARGETS libgromacs
EXPORT libgromacs
- LIBRARY DESTINATION ${LIB_INSTALL_DIR}
- RUNTIME DESTINATION ${BIN_INSTALL_DIR}
- ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
COMPONENT libraries)
endif()
#install also name-links (linker uses those)
file(GLOB CUDA_LIBS ${CUDA_LIB}*)
install(FILES ${CUDA_LIBS} DESTINATION
- ${LIB_INSTALL_DIR} COMPONENT libraries)
+ ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries)
endif()
endforeach()
else()
set(OPENCL_KERNELS ${MDLIB_OPENCL_KERNELS})
install(FILES ${OPENCL_KERNELS} DESTINATION
- ${OCL_INSTALL_DIR} COMPONENT libraries)
+ ${GMX_INSTALL_OCLDIR} COMPONENT libraries)
endif()
if (BUILD_TESTING)
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2014,2016, by the GROMACS development team, led by
+# Copyright (c) 2014,2016,2018, 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.
configure_file(libgromacs.pc.cmakein
libgromacs.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libgromacs.pc
- DESTINATION ${PKGCONFIG_INSTALL_DIR}
+ DESTINATION ${GMX_INSTALL_PKGCONFIGDIR}
RENAME "libgromacs${GMX_LIBS_SUFFIX}.pc"
COMPONENT development)
endfunction()
# 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.
- set(CMAKE_PACKAGE_DIR ${CMAKE_INSTALL_DIR}/gromacs${GMX_LIBS_SUFFIX})
+ set(GMX_INSTALL_CMAKEPKGDIR ${GMX_INSTALL_CMAKEDIR}/gromacs${GMX_LIBS_SUFFIX})
# Install import definitions that take care of the library locations and
# library dependencies.
endif()
install(EXPORT libgromacs
FILE ${EXPORT_FILE_NAME}
- DESTINATION ${CMAKE_PACKAGE_DIR}
+ DESTINATION ${GMX_INSTALL_CMAKEPKGDIR}
COMPONENT libraries)
get_filename_component(GROMACS_CXX_COMPILER ${CMAKE_CXX_COMPILER} REALPATH)
# find_package(GROMACS NAMES gromacs_d) to find them, without also
# specifying CONFIGS.
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gromacs-config.cmake
- DESTINATION ${CMAKE_PACKAGE_DIR}
+ DESTINATION ${GMX_INSTALL_CMAKEPKGDIR}
RENAME "gromacs${GMX_LIBS_SUFFIX}-config.cmake"
COMPONENT development)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gromacs-config-version.cmake
- DESTINATION ${CMAKE_PACKAGE_DIR}
+ DESTINATION ${GMX_INSTALL_CMAKEPKGDIR}
RENAME "gromacs${GMX_LIBS_SUFFIX}-config-version.cmake"
COMPONENT development)
endfunction()
/*
* This file is part of the GROMACS molecular simulation package.
*
- * Copyright (c) 2012,2013,2014,2015,2016,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2013,2014,2015,2016,2017,2018, 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.
*/
bool isAcceptableLibraryPathPrefix(const std::string &path)
{
- std::string testPath = Path::join(path, DATA_INSTALL_DIR, "top");
+ std::string testPath = Path::join(path, GMX_INSTALL_GMXDATADIR, "top");
if (isAcceptableLibraryPath(testPath))
{
return true;
InstallationPrefixInfo info = getProgramContext().installationPrefix();
std::string dataPathSuffix = (info.bSourceLayout ?
"src/gromacs/mdlib/nbnxn_ocl" :
- OCL_INSTALL_DIR);
+ GMX_INSTALL_OCLDIR);
kernelRootPath = Path::join(info.path, dataPathSuffix);
}
else
-libdir=@CMAKE_INSTALL_PREFIX@/@LIB_INSTALL_DIR@
+libdir=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_LIBDIR@
Name: libgromacs@GMX_LIBS_SUFFIX@
Description: Gromacs library
if (!isNullOrEmpty(installPrefix.path))
{
const char *const dataPath
- = installPrefix.bSourceLayout ? "share" : DATA_INSTALL_DIR;
+ = installPrefix.bSourceLayout ? "share" : GMX_INSTALL_GMXDATADIR;
return Path::join(installPrefix.path, dataPath, "top");
}
return std::string();
#
# This file is part of the GROMACS molecular simulation package.
#
-# Copyright (c) 2010,2011,2012,2013,2014,2015,2016, by the GROMACS development team, led by
+# Copyright (c) 2010,2011,2012,2013,2014,2015,2016,2018, 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.
set_target_properties(mdrun PROPERTIES
OUTPUT_NAME "${BINARY_NAME}"
COMPILE_FLAGS "${OpenMP_C_FLAGS}")
- install(TARGETS mdrun DESTINATION ${BIN_INSTALL_DIR} COMPONENT mdrun)
+ install(TARGETS mdrun DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT mdrun)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/gmx-completion-${BINARY_NAME}.bash
"complete -o nospace -F _gmx_mdrun_compl ${BINARY_NAME}")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gmx-completion-${BINARY_NAME}.bash
- DESTINATION ${BIN_INSTALL_DIR} COMPONENT runtime)
+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime)
else()
file(GLOB GMX_MAIN_SOURCES gmx.cpp legacymodules.cpp)
if(GMX_X11)
OUTPUT_NAME "${BINARY_NAME}"
COMPILE_FLAGS "${OpenMP_C_FLAGS}")
install(TARGETS gmx
- RUNTIME DESTINATION ${BIN_INSTALL_DIR})
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
########################
# Completion generation
endif()
if (SOURCE_IS_SOURCE_DISTRIBUTION OR GMX_BUILD_HELP)
install(DIRECTORY ${COMPLETION_DIR}/
- DESTINATION ${BIN_INSTALL_DIR} COMPONENT runtime OPTIONAL)
+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime OPTIONAL)
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/gmx-completion-${BINARY_NAME}.bash
"complete -o nospace -F _gmx_compl ${BINARY_NAME}")
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/gmx-completion-${BINARY_NAME}.bash
- DESTINATION ${BIN_INSTALL_DIR} COMPONENT runtime)
+ DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT runtime)
endif()
gmx_cpack_add_generated_source_directory(completion)