From: Jérémie Dumas Date: Mon, 20 Mar 2017 23:15:27 +0000 (-0400) Subject: Seems that 'target_include_directories' is not enough for SWIG. X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=8456f1a406f55a8acaa5b89ffdd78f01f5eaaaa1;p=nlopt.git Seems that 'target_include_directories' is not enough for SWIG. --- diff --git a/swig/CMakeLists.txt b/swig/CMakeLists.txt index af7e2d2..71c6f78 100644 --- a/swig/CMakeLists.txt +++ b/swig/CMakeLists.txt @@ -28,6 +28,7 @@ if (NUMPY_FOUND AND PYTHONLIBS_FOUND AND (SWIG_FOUND OR (EXISTS ${CMAKE_CURRENT_ set_source_files_properties (nlopt.i PROPERTIES CPLUSPLUS ON) set (SWIG_MODULE_nlopt_EXTRA_DEPS nlopt-python.i numpy.i) + include_directories (${NLOPT_PRIVATE_INCLUDE_DIRS}) swig_add_module (nlopt python nlopt.i) swig_link_libraries (nlopt ${nlopt_lib}) swig_link_libraries (nlopt ${PYTHON_LIBRARIES})