diff --git a/CMakeLists.txt b/CMakeLists.txt index 6e9f4cca..9a18972a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/cmake/SuperBuild.cmake b/cmake/SuperBuild.cmake index 13d6915a..387f7b29 100644 --- a/cmake/SuperBuild.cmake +++ b/cmake/SuperBuild.cmake @@ -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