Skip to content

Commit

Permalink
CMake: Drop Python_NumPy_INCLUDE_DIRS
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed Dec 3, 2024
1 parent 115083d commit 38ec7fd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/swig/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
Expand Down

0 comments on commit 38ec7fd

Please sign in to comment.