From 3538b3491c4b3797e1d64d477b7bc22e86810a27 Mon Sep 17 00:00:00 2001 From: "M. Eric Irrgang" Date: Wed, 17 Jul 2019 18:21:22 +0300 Subject: [PATCH] Don't install sample restraint package by default. When building the sample_restraint project as part of a GROMACS build, do not installed the myplugin Python package as part of the `install` target. This is almost undoubtedly not what the user intended. However, the package is still built when GMX_PYTHON_PACKAGE=ON to help catch errors and facilitate testing by developers or automated systems (i.e. Jenkins). Refs #3027 Change-Id: I934fcc9f8f6f3f749435c5a85a904006e48d1d81 --- .../sample_restraint/src/pythonmodule/CMakeLists.txt | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/python_packaging/sample_restraint/src/pythonmodule/CMakeLists.txt b/python_packaging/sample_restraint/src/pythonmodule/CMakeLists.txt index 985b010bf1..8d50049045 100644 --- a/python_packaging/sample_restraint/src/pythonmodule/CMakeLists.txt +++ b/python_packaging/sample_restraint/src/pythonmodule/CMakeLists.txt @@ -21,8 +21,10 @@ set_target_properties(sampleplugin PROPERTIES INSTALL_RPATH_USE_LINK_PATH TRUE) # CMakeLists.txt target_link_libraries(sampleplugin PRIVATE Gromacs::gmxapi harmonicpotential ensemblepotential) -install(TARGETS sampleplugin - LIBRARY DESTINATION ${GMXPLUGIN_INSTALL_PATH} - ARCHIVE DESTINATION ${GMXPLUGIN_INSTALL_PATH} - RUNTIME DESTINATION ${GMXPLUGIN_INSTALL_PATH} - ) +if(GMXAPI_EXTENSION_MASTER_PROJECT) + install(TARGETS sampleplugin + LIBRARY DESTINATION ${GMXPLUGIN_INSTALL_PATH} + ARCHIVE DESTINATION ${GMXPLUGIN_INSTALL_PATH} + RUNTIME DESTINATION ${GMXPLUGIN_INSTALL_PATH} + ) +endif() -- 2.11.4.GIT