mirror of
https://github.com/NGSolve/netgen.git
synced 2024-11-14 10:08:32 +05:00
CMake 3.16 compatibility
This commit is contained in:
parent
80098c1e93
commit
c8888086ae
@ -87,6 +87,7 @@ 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 Interpreter Development.Module)
|
||||||
|
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()
|
||||||
@ -319,8 +320,7 @@ if (USE_PYTHON)
|
|||||||
|
|
||||||
target_include_directories(netgen_python INTERFACE ${pybind11_INCLUDE_DIR} ${Python3_INCLUDE_DIRS})
|
target_include_directories(netgen_python INTERFACE ${pybind11_INCLUDE_DIR} ${Python3_INCLUDE_DIRS})
|
||||||
target_include_directories(nglib PRIVATE ${pybind11_INCLUDE_DIR} ${Python3_INCLUDE_DIRS})
|
target_include_directories(nglib PRIVATE ${pybind11_INCLUDE_DIR} ${Python3_INCLUDE_DIRS})
|
||||||
if(NOT ${BUILD_FOR_CONDA} OR WIN32)
|
if(Python3_LIBRARIES)
|
||||||
# Don't link python libraries in conda environments
|
|
||||||
target_link_libraries(netgen_python INTERFACE ${Python3_LIBRARIES})
|
target_link_libraries(netgen_python INTERFACE ${Python3_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -183,6 +183,7 @@ if (USE_PYTHON)
|
|||||||
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 REQUIRED COMPONENTS Interpreter Development.Module)
|
||||||
|
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()
|
||||||
|
Loading…
Reference in New Issue
Block a user