mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 05:50:32 +05:00
Find python3 Development.Module, require CMake 3.18
This commit is contained in:
parent
56d1dbb2b6
commit
4f83d8b1b6
@ -2,8 +2,8 @@ if(NOT CMAKE_BUILD_TYPE)
|
|||||||
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING INTERNAL)
|
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING INTERNAL)
|
||||||
endif(NOT CMAKE_BUILD_TYPE)
|
endif(NOT CMAKE_BUILD_TYPE)
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 3.13)
|
cmake_minimum_required(VERSION 3.18)
|
||||||
cmake_policy(VERSION 3.13)
|
cmake_policy(VERSION 3.18)
|
||||||
|
|
||||||
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24.0")
|
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.24.0")
|
||||||
cmake_policy(SET CMP0135 NEW)
|
cmake_policy(SET CMP0135 NEW)
|
||||||
@ -85,7 +85,7 @@ endif()
|
|||||||
set(NG_INSTALL_SUFFIX netgen CACHE STRING "Suffix appended to install directories (project name)")
|
set(NG_INSTALL_SUFFIX netgen CACHE STRING "Suffix appended to install directories (project name)")
|
||||||
|
|
||||||
if(USE_PYTHON)
|
if(USE_PYTHON)
|
||||||
find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
|
find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module)
|
||||||
|
|
||||||
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)
|
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)
|
file(TO_CMAKE_PATH ${PYTHON_PACKAGES_INSTALL_DIR} PYTHON_PACKAGES_INSTALL_DIR)
|
||||||
|
@ -181,7 +181,7 @@ if (USE_PYTHON)
|
|||||||
else( PYBIND_INCLUDE_DIR )
|
else( PYBIND_INCLUDE_DIR )
|
||||||
message(FATAL_ERROR "Could NOT find pybind11!")
|
message(FATAL_ERROR "Could NOT find pybind11!")
|
||||||
endif( PYBIND_INCLUDE_DIR )
|
endif( PYBIND_INCLUDE_DIR )
|
||||||
find_package(Python3 REQUIRED COMPONENTS Interpreter Development)
|
find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module)
|
||||||
|
|
||||||
set_vars(NETGEN_CMAKE_ARGS
|
set_vars(NETGEN_CMAKE_ARGS
|
||||||
Python3_INCLUDE_DIRS
|
Python3_INCLUDE_DIRS
|
||||||
|
Loading…
Reference in New Issue
Block a user