Skip to content

Commit

Permalink
Remove duplicated find python
Browse files Browse the repository at this point in the history
  • Loading branch information
jmarrec committed Jan 27, 2025
1 parent 240d733 commit 4aee6c4
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ if (BUILD_PYTHON_BINDINGS)
set(Python_ROOT_DIR "" CACHE PATH "The path to the root installation of your python version, if you want to explicitly set it (Optional)")
mark_as_advanced(Python_REQUIRED_VERSION)
mark_as_advanced(Python_ROOT_DIR)
# **Only** find static libs
set(Python_USE_STATIC_LIBS TRUE)
if(Python_REQUIRED_VERSION)
find_package(Python ${Python_REQUIRED_VERSION} EXACT COMPONENTS Interpreter Development REQUIRED)
else()
Expand All @@ -37,14 +39,6 @@ if (BUILD_PYTHON_BINDINGS)

set(swig_target_name ${PROJECT_NAME}_python)

# **Only** find static libs
set(Python_USE_STATIC_LIBS TRUE)

find_package(
Python
COMPONENTS Interpreter Development
REQUIRED)

swig_add_library(
${swig_target_name}
TYPE SHARED
Expand Down

0 comments on commit 4aee6c4

Please sign in to comment.