From 34c2fa0beea10308bc9afe6f20b734fc0839b226 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Wed, 31 May 2017 18:45:01 -0700 Subject: mpm: Cleaned up CMake, made Python version an option --- mpm/CMakeLists.txt | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'mpm/CMakeLists.txt') diff --git a/mpm/CMakeLists.txt b/mpm/CMakeLists.txt index 8a11464bc..25ccb8afe 100644 --- a/mpm/CMakeLists.txt +++ b/mpm/CMakeLists.txt @@ -30,9 +30,14 @@ ENDMACRO(USRP_PERIPHS_ADD_OBJECT) MESSAGE(STATUS "") MESSAGE(STATUS "Configuring Boost C++ Libraries...") SET(BOOST_REQUIRED_COMPONENTS - python system ) +IF(MPM_PYTHON_VER EQUAL 3) + LIST(APPEND BOOST_REQUIRED_COMPONENTS python3) +ELSE() + LIST(APPEND BOOST_REQUIRED_COMPONENTS python) +ENDIF() + IF(MINGW) LIST(APPEND BOOST_REQUIRED_COMPONENTS thread_win32) ELSE() @@ -69,9 +74,15 @@ MESSAGE(STATUS "Boost libraries: ${Boost_LIBRARIES}") # Setup Python API ######################################################################## +SET(MPM_PYTHON_VER 2 CACHE STRING "Python version (2 or 3)") SET(PYTHON_ADDITIONAL_VERSIONS 2.7 3.4 3.5) -FIND_PACKAGE(PythonInterp) -FIND_PACKAGE(PythonLibs) +FIND_PACKAGE(PythonInterp ${MPM_PYTHON_VER}) +#IF(MPM_PYTHON_VER EQUAL "2") + #FIND_PACKAGE(PythonInterp) +#ELSE() + #FIND_PACKAGE(PythonInterp 3) +#ENDIF() +FIND_PACKAGE(PythonLibs ${MPM_PYTHON_VER}) ######################################################################## # Install Dirs -- cgit v1.2.3