mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 05:50:32 +05:00
Emscripten support
This commit is contained in:
parent
8955f572a1
commit
291a5e4aa6
@ -86,14 +86,16 @@ set(NG_INSTALL_SUFFIX netgen CACHE STRING "Suffix appended to install directorie
|
|||||||
|
|
||||||
if(USE_PYTHON)
|
if(USE_PYTHON)
|
||||||
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.18)
|
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.18)
|
||||||
find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module)
|
find_package(Python3 REQUIRED COMPONENTS Development.Module)
|
||||||
find_package(Python3 COMPONENTS Interpreter Development.Embed)
|
find_package(Python3 COMPONENTS Interpreter Development.Embed)
|
||||||
else()
|
else()
|
||||||
find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
|
find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
execute_process(COMMAND ${Python3_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)
|
if(NOT CMAKE_CROSSCOMPILING)
|
||||||
file(TO_CMAKE_PATH ${PYTHON_PACKAGES_INSTALL_DIR} PYTHON_PACKAGES_INSTALL_DIR)
|
execute_process(COMMAND ${Python3_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)
|
||||||
|
endif(NOT CMAKE_CROSSCOMPILING)
|
||||||
endif(USE_PYTHON)
|
endif(USE_PYTHON)
|
||||||
|
|
||||||
if(APPLE AND NOT EMSCRIPTEN)
|
if(APPLE AND NOT EMSCRIPTEN)
|
||||||
|
@ -183,7 +183,7 @@ if (USE_PYTHON)
|
|||||||
message(FATAL_ERROR "Could NOT find pybind11!")
|
message(FATAL_ERROR "Could NOT find pybind11!")
|
||||||
endif( PYBIND_INCLUDE_DIR )
|
endif( PYBIND_INCLUDE_DIR )
|
||||||
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.18)
|
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL 3.18)
|
||||||
find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module)
|
find_package(Python3 COMPONENTS Interpreter Development.Module)
|
||||||
find_package(Python3 COMPONENTS Interpreter Development.Embed)
|
find_package(Python3 COMPONENTS Interpreter Development.Embed)
|
||||||
else()
|
else()
|
||||||
find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
|
find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
|
||||||
|
Loading…
Reference in New Issue
Block a user