pviktori / rpms / ompl

Forked from rpms/ompl 4 years ago
Clone
Blob Blame History Raw
diff -up ./CMakeLists.txt.pybindings ./CMakeLists.txt
--- ./CMakeLists.txt.pybindings	2018-12-29 12:16:50.423167378 -0500
+++ ./CMakeLists.txt	2018-12-29 12:17:15.421269227 -0500
@@ -89,25 +89,6 @@ find_package(Threads QUIET)
 
 enable_testing()
 
-find_package(Python QUIET)
-find_boost_python()
-
-if(PYTHON_FOUND)
-    # PyPy is more than an order of magnitude faster in generating the Python
-    # bindings than CPython, so use it if available.
-    find_program(PYPY NAMES pypy${PYTHON_VERSION_MAJOR} pypy)
-    if(PYPY)
-        option(OMPL_USE_PYPY "Use PyPy for generating Python bindings" ON)
-    else()
-        option(OMPL_USE_PYPY "Use PyPy for generating Python bindings" OFF)
-    endif()
-    if(OMPL_USE_PYPY)
-        set(PYTHON_BINDING_EXEC "${PYPY}")
-    else()
-        set(PYTHON_BINDING_EXEC "${PYTHON_EXEC}")
-    endif()
-endif()
-
 # Eigen is needed for the InformedStateSampler
 find_package(Eigen3 QUIET)
 if (EIGEN3_FOUND)
diff -up ./py-bindings/CMakeLists.txt.pybindings ./py-bindings/CMakeLists.txt
--- ./py-bindings/CMakeLists.txt.pybindings	2018-12-29 12:17:24.863307702 -0500
+++ ./py-bindings/CMakeLists.txt	2018-12-29 12:18:21.539538639 -0500
@@ -3,6 +3,25 @@ option(OMPL_BUILD_PYTESTS "Build OMPL Py
 
 if (OMPL_BUILD_PYBINDINGS)
 
+    find_package(Python QUIET)
+    find_boost_python()
+
+    if(PYTHON_FOUND)
+        # PyPy is more than an order of magnitude faster in generating the Python
+        # bindings than CPython, so use it if available.
+        find_program(PYPY NAMES pypy${PYTHON_VERSION_MAJOR} pypy)
+        if(PYPY)
+            option(OMPL_USE_PYPY "Use PyPy for generating Python bindings" ON)
+        else()
+            option(OMPL_USE_PYPY "Use PyPy for generating Python bindings" OFF)
+        endif()
+        if(OMPL_USE_PYPY)
+            set(PYTHON_BINDING_EXEC "${PYPY}")
+        else()
+            set(PYTHON_BINDING_EXEC "${PYTHON_EXEC}")
+        endif()
+    endif()
+
     include(PythonBindingsUtils)
 
     if(WIN32)