Commit 808c1722 authored by Guilhem Saurel's avatar Guilhem Saurel
Browse files

[CMake] fix python usage

parent aa58bd7c
...@@ -21,6 +21,7 @@ INCLUDE(cmake/eigen.cmake) ...@@ -21,6 +21,7 @@ INCLUDE(cmake/eigen.cmake)
INCLUDE(cmake/pthread.cmake) INCLUDE(cmake/pthread.cmake)
INCLUDE(cmake/cpack.cmake) INCLUDE(cmake/cpack.cmake)
include(cmake/header.cmake) include(cmake/header.cmake)
include(cmake/python.cmake)
SET(PROJECT_NAME dynamic-graph-python) SET(PROJECT_NAME dynamic-graph-python)
SET(PROJECT_DESCRIPTION "Dynamic graph library Python bindings") SET(PROJECT_DESCRIPTION "Dynamic graph library Python bindings")
...@@ -39,6 +40,8 @@ SET(PKG_CONFIG_ADDITIONAL_VARIABLES plugindir ${PKG_CONFIG_ADDITIONAL_VARIABLES} ...@@ -39,6 +40,8 @@ SET(PKG_CONFIG_ADDITIONAL_VARIABLES plugindir ${PKG_CONFIG_ADDITIONAL_VARIABLES}
SETUP_PROJECT() SETUP_PROJECT()
FINDPYTHON()
# Trigger dependency to dynamic-graph. # Trigger dependency to dynamic-graph.
ADD_REQUIRED_DEPENDENCY("dynamic-graph >= 3.0.0") ADD_REQUIRED_DEPENDENCY("dynamic-graph >= 3.0.0")
......
...@@ -16,14 +16,10 @@ ...@@ -16,14 +16,10 @@
# #
# Python # Python
# #
set(Python_ADDITIONAL_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0)
INCLUDE(../cmake/python.cmake)
FINDPYTHON()
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS} ${PYTHON_LIBRARY_DIRS}) LINK_DIRECTORIES(${Boost_LIBRARY_DIRS} ${PYTHON_LIBRARY_DIRS})
INCLUDE(../cmake/python.cmake)
# #
# #
# Python interpreter # Python interpreter
...@@ -36,6 +32,7 @@ ADD_LIBRARY(${LIBRARY_NAME} ...@@ -36,6 +32,7 @@ ADD_LIBRARY(${LIBRARY_NAME}
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} TARGET_LINK_LIBRARIES(${LIBRARY_NAME}
${PYTHON_LIBRARY}) ${PYTHON_LIBRARY})
TARGET_LINK_BOOST_PYTHON(${LIBRARY_NAME})
IF(UNIX) IF(UNIX)
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${Boost_LIBRARIES}) TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${Boost_LIBRARIES})
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment