mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Support using pybind from the system.
This should make packaging easier and more streamlined to the process on some Linux systems.
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
if(NOT TARGET pybind11)
|
||||
find_package(pybind11 2.2 CONFIG)
|
||||
|
||||
if(NOT pybind11_FOUND)
|
||||
add_subdirectory( pybind11 )
|
||||
# SYSTEM is supported for embedded pybind source (>= 2.3.0)
|
||||
set(PYBIND11_SYSTEM "SYSTEM")
|
||||
elseif(pybind11_VERSION VERSION_GREATER_EQUAL "2.3.0")
|
||||
# SYSTEM is only support for pybind >= 2.3.0 (Unfortunately querying the
|
||||
# version does not work. AT least we know the embedded one.
|
||||
set(PYBIND11_SYSTEM "SYSTEM")
|
||||
endif()
|
||||
add_subdirectory( simulators )
|
||||
|
||||
Reference in New Issue
Block a user