Skip to content

Commit

Permalink
CMake: Always use Python::Module
Browse files Browse the repository at this point in the history
  • Loading branch information
jschueller committed Dec 4, 2024
1 parent 38ec7fd commit 8c6e52c
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 108 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# Benoit Scherrer, 2010 CRL, Harvard Medical School
# Copyright (c) 2008-2009 Children's Hospital Boston
#==============================================================================
cmake_minimum_required (VERSION 3.14)
cmake_minimum_required (VERSION 3.15)

set (CMAKE_BUILD_TYPE Release CACHE STRING "Build type")

Expand Down
100 changes: 0 additions & 100 deletions cmake/TargetLinkLibrariesWithDynamicLookup.cmake

This file was deleted.

8 changes: 1 addition & 7 deletions src/swig/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,7 @@ if (Python_NumPy_FOUND)

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 ()
target_link_libraries (nlopt_python Python::Module)

set_target_properties (nlopt_python PROPERTIES OUTPUT_NAME nlopt)
set_target_properties (nlopt_python PROPERTIES COMPILE_FLAGS "${SWIG_COMPILE_FLAGS}")
Expand Down

0 comments on commit 8c6e52c

Please sign in to comment.