cmake broken; doesnt compile without -DPYTHONOCC_MESHDS_NUMPY=ON
Opened this issue · 0 comments
wirbel-at-vdr-portal commented
Without -DPYTHONOCC_MESHDS_NUMPY=ON (it defaults to OFF), pythonocc-core doesnt compile, as numpy/arrayobject.h is used by the code (GeomPYTHON_warp.cxx, Geom2dPYTHON_wrap.cxx, ...), but the numpy includes are disabled in CMakeLists.txt without it:
if(PYTHONOCC_MESHDS_NUMPY)
find_package(Python3 COMPONENTS Interpreter Development NumPy REQUIRED) << here is numpy included
include_directories(${Python3_NumPy_INCLUDE_DIRS})
message(STATUS "Numpy include directory: ${Python3_NumPy_INCLUDE_DIRS}")
set(CMAKE_SWIG_FLAGS ${CMAKE_SWIG_FLAGS} -DBUILD_MESHDS_NUMPY)
else(PYTHONOCC_MESHDS_NUMPY)
find_package(Python3 COMPONENTS Interpreter Development REQUIRED) << here is numpy not included, but used.
endif(PYTHONOCC_MESHDS_NUMPY)
W11, MSVC-2022, Python-3.12.0, OpenCascade-7.9.0