Skip to content
Snippets Groups Projects
Commit d43f475b authored by Francois Keith's avatar Francois Keith Committed by Francois Keith
Browse files

Clean cmake files by using the routines in cmake/python.cmake

parent 3369deb1
No related branches found
No related tags found
No related merge requests found
...@@ -16,17 +16,8 @@ ...@@ -16,17 +16,8 @@
# #
# Python # Python
# #
INCLUDE(FindPythonLibs) INCLUDE(../cmake/python.cmake)
IF (NOT ${PYTHONLIBS_FOUND} STREQUAL TRUE) FINDPYTHON()
MESSAGE(FATAL_ERROR "Python has not been found.")
ELSE()
MESSAGE(STATUS "PYTHON_LIBRARY=${PYTHON_LIBRARY}")
ENDIF (NOT ${PYTHONLIBS_FOUND} STREQUAL TRUE)
INCLUDE(FindPythonInterp)
IF (NOT ${PYTHONINTERP_FOUND} STREQUAL TRUE)
MESSAGE(FATAL_ERROR "Python executable has not been found.")
ENDIF (NOT ${PYTHONINTERP_FOUND} STREQUAL TRUE)
INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
LINK_DIRECTORIES(${Boost_LIBRARY_DIRS}) LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
...@@ -95,12 +86,6 @@ INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH} ...@@ -95,12 +86,6 @@ INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH}
# Installation # Installation
# #
EXEC_PROGRAM(${PYTHON_EXECUTABLE} ARGS
"-c \"import sys, os; print os.sep.join(['lib', 'python' + sys.version[:3], 'site-packages'])\""
OUTPUT_VARIABLE PYTHON_SITELIB)
MESSAGE(STATUS "PYTHON_SITELIB=${PYTHON_SITELIB}")
SET(PYTHON_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/${PYTHON_SITELIB}/dynamic_graph) SET(PYTHON_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/${PYTHON_SITELIB}/dynamic_graph)
INSTALL(TARGETS ${PYTHON_MODULE} INSTALL(TARGETS ${PYTHON_MODULE}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment