From: Jérémie Dumas Date: Wed, 11 Jan 2017 13:49:32 +0000 (+0100) Subject: Update CMakeLists.txt X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=2b94566ef5b245f9e5efe2fb9478372c03c59a64;p=nlopt.git Update CMakeLists.txt --- diff --git a/swig/CMakeLists.txt b/swig/CMakeLists.txt index faba14c..af7e2d2 100644 --- a/swig/CMakeLists.txt +++ b/swig/CMakeLists.txt @@ -28,10 +28,10 @@ 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}) + target_include_directories (${SWIG_MODULE_nlopt_REAL_NAME} PRIVATE ${NLOPT_PRIVATE_INCLUDE_DIRS}) endif () install (FILES ${CMAKE_CURRENT_BINARY_DIR}/nlopt.py DESTINATION ${INSTALL_PYTHON_DIR})