Skip to content

Commit

Permalink
Refactor CMakeLists.txt to unify Python detection and improve pybind1…
Browse files Browse the repository at this point in the history
…1 integration
  • Loading branch information
TLCFEM committed Feb 3, 2025
1 parent 875c84d commit 1bce181
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,10 @@ endif ()

add_executable(vpmr src/VPMR.cpp)

find_package(Python3 COMPONENTS Development Interpreter)
if (Python3_FOUND)
find_package(Python 3 COMPONENTS Development Interpreter)
if (Python_FOUND)
add_subdirectory(pybind11)
message(STATUS "Python3: ${Python3_VERSION}")
include_directories(${Python3_INCLUDE_DIRS})
message(STATUS "Python3: ${Python_VERSION}")

pybind11_add_module(_pyvpmr src/VPMR.cpp)
target_compile_definitions(_pyvpmr PRIVATE PYVPMR)
Expand Down

0 comments on commit 1bce181

Please sign in to comment.