Don't search for PythonLibs when building pip/conda package

Since python is linked statically there are no libraries
This commit is contained in:
Matthias Hochsteger 2023-05-11 18:39:03 +02:00
parent 748e2c742c
commit 6992a63cf8
2 changed files with 6 additions and 2 deletions

View File

@ -127,7 +127,9 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
if(USE_PYTHON)
find_package(PythonInterp 3 REQUIRED)
find_package(PythonLibs 3 REQUIRED)
if(NOT BUILD_FOR_CONDA)
find_package(PythonLibs 3 REQUIRED)
endif()
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1,0,''))" OUTPUT_VARIABLE PYTHON_PACKAGES_INSTALL_DIR OUTPUT_STRIP_TRAILING_WHITESPACE)
file(TO_CMAKE_PATH ${PYTHON_PACKAGES_INSTALL_DIR} PYTHON_PACKAGES_INSTALL_DIR)

View File

@ -166,7 +166,9 @@ if (USE_PYTHON)
message(FATAL_ERROR "Could NOT find pybind11!")
endif( PYBIND_INCLUDE_DIR )
find_package(PythonInterp 3 REQUIRED)
find_package(PythonLibs 3 REQUIRED)
if(NOT BUILD_FOR_CONDA)
find_package(PythonLibs 3 REQUIRED)
endif()
set_vars(NETGEN_CMAKE_ARGS
PYTHON_INCLUDE_DIRS