From a4a4b9250b9b893c9ee5982e32b7fa5bae568088 Mon Sep 17 00:00:00 2001 From: Julien Schueller Date: Tue, 3 Dec 2024 22:01:21 +0100 Subject: [PATCH] CMake: Drop Python_NumPy_INCLUDE_DIRS --- src/swig/CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/swig/CMakeLists.txt b/src/swig/CMakeLists.txt index cccfc6aa..7d0c1808 100644 --- a/src/swig/CMakeLists.txt +++ b/src/swig/CMakeLists.txt @@ -26,14 +26,12 @@ if (Python_NumPy_FOUND) # swig_add_module is deprecated swig_add_library (nlopt_python LANGUAGE python SOURCES nlopt.i) - target_include_directories (nlopt_python PRIVATE ${Python_INCLUDE_DIRS}) - target_include_directories (nlopt_python PRIVATE ${Python_NumPy_INCLUDE_DIRS}) - target_link_libraries (nlopt_python ${nlopt_lib}) target_link_libraries (nlopt_python Python::NumPy) if (TARGET Python::Module) target_link_libraries (nlopt_python Python::Module) else () + target_include_directories (nlopt_python PRIVATE ${Python_INCLUDE_DIRS}) include (TargetLinkLibrariesWithDynamicLookup) target_link_libraries_with_dynamic_lookup (${nlopt_python} ${Python_LIBRARIES}) endif ()