Skip to content

Commit

Permalink
Merge pull request #30 from olivier-stasse/devel
Browse files Browse the repository at this point in the history
Fix boost python detection problem to allow multiple python interpreters
  • Loading branch information
jcarpent committed May 1, 2018
2 parents b19c481 + e6ce0a2 commit 80a2aff
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 6 deletions.
25 changes: 20 additions & 5 deletions CMakeLists.txt
Expand Up @@ -52,25 +52,40 @@ ELSE(WIN32)
SET(LINK create_symlink)
ENDIF(WIN32)


# ----------------------------------------------------
# --- OPTIONS ---------------------------------------
# ----------------------------------------------------
OPTION (BUILD_UNIT_TESTS "Build the unitary tests" ON)

SET(Python_ADDITIONAL_VERSIONS 3.5)
FINDPYTHON()

INCLUDE_DIRECTORIES(SYSTEM ${PYTHON_INCLUDE_DIRS})
FIND_NUMPY()
INCLUDE_DIRECTORIES(SYSTEM ${NUMPY_INCLUDE_DIRS})

# ----------------------------------------------------
# --- DEPENDANCIES -----------------------------------
# ----------------------------------------------------
ADD_REQUIRED_DEPENDENCY("eigen3 >= 3.0.5")

SET(BOOST_COMPONENTS python)
if (${PYTHON_VERSION_MAJOR} EQUAL 3)
if(UNIX)
set( BOOST_COMPONENTS python-py35)
else()
set( BOOST_COMPONENTS python3)
endif()
else()
SET(BOOST_COMPONENTS python)
endif()


SEARCH_FOR_BOOST()
# Add Boost path to include directories.
INCLUDE_DIRECTORIES(SYSTEM ${Boost_INCLUDE_DIRS})

FINDPYTHON(2.7 EXACT REQUIRED)
INCLUDE_DIRECTORIES(SYSTEM ${PYTHON_INCLUDE_DIRS})
FIND_NUMPY()
INCLUDE_DIRECTORIES(SYSTEM ${NUMPY_INCLUDE_DIRS})
#FINDPYTHON(2.7 EXACT REQUIRED)

# ----------------------------------------------------
# --- INCLUDE ----------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion cmake

0 comments on commit 80a2aff

Please sign in to comment.