From 2ab333829c096fea3d062fac2f4c13e3aae6d1c5 Mon Sep 17 00:00:00 2001 From: David Wagner Date: Tue, 17 Mar 2015 11:58:40 +0100 Subject: cmake/python bindings: reorganize include_directories() instructions 1) PYTHON_INCLUDE_PATH is deprecated in favor of PYTHON_INCLUDE_DIRS 2) adding the current source directory to the include dirs is useless since it is implicit. 3) group all include_directories() instructions to the same place in the makefile. Signed-off-by: David Wagner --- bindings/python/CMakeLists.txt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/bindings/python/CMakeLists.txt b/bindings/python/CMakeLists.txt index 7e18014..3fef435 100644 --- a/bindings/python/CMakeLists.txt +++ b/bindings/python/CMakeLists.txt @@ -30,9 +30,9 @@ find_package(SWIG REQUIRED) include(${SWIG_USE_FILE}) find_package(PythonLibs REQUIRED) -include_directories(${PYTHON_INCLUDE_PATH}) +include_directories(${PYTHON_INCLUDE_DIRS}) -include_directories(${CMAKE_CURRENT_SOURCE_DIR}) +include_directories(${PROJECT_SOURCE_DIR}/parameter/include) set_property(SOURCE pfw.i PROPERTY CPLUSPLUS ON) set_property(SOURCE pfw.i PROPERTY SWIG_FLAGS "-Wall" "-Werror") @@ -41,8 +41,6 @@ swig_add_module(PyPfw python pfw.i) swig_link_libraries(PyPfw parameter ${PYTHON_LIBRARIES}) -include_directories(${PROJECT_SOURCE_DIR}/parameter/include ${PYTHON_INCLUDE_DIRS}) - # The 'unused-but-set-variable' warning must be disabled because SWIG generates # files that do not respect that contraint. # '-DSWIG_PYTHON_SILENT_MEMLEAK' is needed because the "memleak" warning -- cgit v1.1