chiark / gitweb /
Update CMakeLists.txt
authorJérémie Dumas <jdumas@users.noreply.github.com>
Wed, 11 Jan 2017 13:49:32 +0000 (14:49 +0100)
committerJérémie Dumas <jeremie.dumas@ens-lyon.org>
Tue, 21 Mar 2017 14:35:06 +0000 (10:35 -0400)
swig/CMakeLists.txt

index faba14c640781461daf55664e96beb2953d7ec2d..af7e2d2e62c00c4733d1455939c780654eade4e7 100644 (file)
@@ -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})