From 60731fd65659c97515ec233030a6539a967ddb26 Mon Sep 17 00:00:00 2001 From: Alexey Shvetsov Date: Tue, 14 Oct 2014 13:33:12 +0400 Subject: [PATCH] Fix compilation of python bindings Change-Id: I72cf4cc73e05e4192764c4e4b551d22d78274922 Signed-off-by: Alexey Shvetsov --- CMakeLists.txt | 8 +++----- src/python/CMakeLists.txt | 3 +++ 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b876fc8855..923134e699 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -866,12 +866,10 @@ set(GMX_GPU_DETECTION_DONE TRUE CACHE INTERNAL "Whether GPU detection has alread ####################### ## Python bindings ####################### + +# We only set option here, actual detection goes to +# src/python/CMakeLists.txt due to bugs in FindSIP option(GMX_PYTHON_BINDINGS "Enable GROMACS Python API bindings" OFF) -if (GMX_PYTHON_BINDINGS) - # We use SIP so we need to find it - find_package(PythonLibrary REQUIRED) - find_package(SIP REQUIRED) -endif() ####################### diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt index 84c869cbaa..1aec631f19 100644 --- a/src/python/CMakeLists.txt +++ b/src/python/CMakeLists.txt @@ -33,6 +33,9 @@ # the research papers on the package. Check out http://www.gromacs.org. # +find_package(PythonLibrary REQUIRED) +find_package(SIP REQUIRED) + include(SIPMacros) include(PythonMacros) -- 2.22.0