From d2ec55c23de8ee431b874894a5a320c99c3b944a Mon Sep 17 00:00:00 2001
From: Simon Oehrl <oehrl@vr.rwth-aachen.de>
Date: Wed, 10 Jul 2019 16:03:45 +0200
Subject: [PATCH] Adjust python version

---
 CMakeLists.txt                      | 6 +++---
 pynesci/src/CMakeLists.txt          | 2 +-
 pynesci/src/consumer/CMakeLists.txt | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3c09fb6..09cc79d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -72,10 +72,10 @@ if (WITH_PYTHON_BINDINGS)
   endif (ENABLE_TESTS)
 
   find_package(PythonInterp REQUIRED)
-  find_package(PythonLibs REQUIRED)
-  find_package(Boost REQUIRED COMPONENTS python)
+  find_package(PythonLibs ${PYTHON_VERSION_STRING} EXACT REQUIRED)
+  find_package(Boost REQUIRED COMPONENTS python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR})
 
-  # add_subdirectory(pynesci)
+  add_subdirectory(pynesci)
 endif (WITH_PYTHON_BINDINGS)
 
 install(
diff --git a/pynesci/src/CMakeLists.txt b/pynesci/src/CMakeLists.txt
index 0758ac3..240c295 100644
--- a/pynesci/src/CMakeLists.txt
+++ b/pynesci/src/CMakeLists.txt
@@ -34,7 +34,7 @@ add_python_module(
   HEADERS ${HEADERS}
   PYTHON_SOURCES ${PYTHON_SOURCES}
   INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}
-  LINK_LIBRARIES Boost::python Boost::disable_autolinking conduit
+  LINK_LIBRARIES Boost::python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR} Boost::disable_autolinking conduit
   OUTPUT_DIRECTORY ${PYNESCI_OUTPUT_DIR}
   )
 
diff --git a/pynesci/src/consumer/CMakeLists.txt b/pynesci/src/consumer/CMakeLists.txt
index 278750c..895260d 100644
--- a/pynesci/src/consumer/CMakeLists.txt
+++ b/pynesci/src/consumer/CMakeLists.txt
@@ -34,6 +34,6 @@ add_python_module(
   HEADERS ${HEADERS}
   PYTHON_SOURCES ${PYTHON_SOURCES}
   INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}
-  LINK_LIBRARIES nesci::consumer Boost::python Boost::disable_autolinking
+  LINK_LIBRARIES nesci::consumer Boost::python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR} Boost::disable_autolinking
   OUTPUT_DIRECTORY ${PYCONSUMER_OUTPUT_DIR}
   )
-- 
GitLab