Commit 319957f7 authored by T.J. Corona's avatar T.J. Corona

Add pybind11 support to the superbuild.

parent 105ec827
Pipeline #41595 running with stage
......@@ -38,6 +38,7 @@ function (superbuild_find_projects var)
paraviewwebvisualizer
paraviewweblightviz
png
pybind11
python
pythongirderclient
pythonrequests
......@@ -82,6 +83,18 @@ function (superbuild_sanity_check)
message(FATAL_ERROR
"At least one of the following projects must be enabled: cmb, smtk.")
endif ()
if (shiboken_enabled AND pybind11_enabled)
message(FATAL_ERROR
"Only one python wrapping protocol should be enabled: pybind11, shiboken.")
endif ()
if (cmb_enabled AND NOT shiboken_enabled AND NOT pybind11_enabled)
message(FATAL_ERROR
"Exactly one python wrapping protocol must be enabled: pybind11, shiboken.")
endif ()
if (MSVC AND (MSVC_VERSION LESS 1900) AND pybind11_enabled)
message(FATAL_ERROR
"Visual Studio 2015 or later is required to use pybind11; use shiboken instead.")
endif ()
endfunction ()
function (superbuild_add_packaging)
......@@ -161,6 +174,7 @@ set(suppress_projects
numpy
oce
png
pybind11
shiboken
szip
vxl
......
......@@ -13,7 +13,7 @@ superbuild_add_project(cmb
DEVELOPER_MODE
DEBUGGABLE
DEFAULT_ON
DEPENDS boost remus vxl gdal qt4 python paraview shiboken
DEPENDS boost remus vxl gdal qt4 python paraview
cmbworkflows zeromq opencv
smtk # XXX(smtk): until the submodule works properly
DEPENDS_OPTIONAL moab smtk cumulus ${cmb_extra_optional_dependencies}
......
# for now, pybind11 is a third-party submodule of smtk. This project is a dummy
superbuild_add_dummy_project(pybind11
DEPENDS python)
......@@ -13,13 +13,18 @@ if (WIN32)
set(smtk_libdir bin)
endif ()
set(smtk_enable_python_wrapping)
if (shiboken_enabled OR pybind11_enabled)
set(smtk_enable_python_wrapping ON)
endif ()
#explicitly depend on gdal so we inherit the location of the GDAL library
#which FindGDAL.cmake fails to find, even when given GDAL_DIR.
superbuild_add_project(smtk
DEVELOPER_MODE
DEBUGGABLE
DEPENDS boost cxx11 qt4 shiboken paraview python remus hdf5 zeromq gdal
DEPENDS_OPTIONAL moab netcdf cgm cumulus opencv
DEPENDS boost cxx11 gdal hdf5 paraview python qt4 remus zeromq
DEPENDS_OPTIONAL cgm cumulus moab netcdf opencv pybind11 shiboken
CMAKE_ARGS
${smtk_extra_cmake_args}
-DBUILD_SHARED_LIBS:BOOL=ON
......@@ -32,7 +37,8 @@ superbuild_add_project(smtk
-DSMTK_ENABLE_EXODUS_SESSION:BOOL=ON
-DSMTK_ENABLE_REMOTE_SESSION:BOOL=ON
-DSMTK_ENABLE_REMUS_SUPPORT:BOOL=ON
-DSMTK_ENABLE_PYTHON_WRAPPING:BOOL=${shiboken_enabled}
-DSMTK_ENABLE_PYTHON_WRAPPING:BOOL=${smtk_enable_python_wrapping}
-DSMTK_USE_PYBIND11=${pybind11_enabled}
-DCMAKE_INSTALL_LIBDIR:STRING=${smtk_libdir}
-DSMTK_DATA_DIR:PATH=${CMB_TEST_DATA_ROOT}
......
......@@ -85,6 +85,12 @@ superbuild_set_revision(pythongirderclient
URL "https://pypi.python.org/packages/source/g/girder-client/girder-client-1.1.2.tar.gz"
URL_MD5 4cd5e0cab41337a41f45453d25193dcf)
superbuild_set_revision(pybind11
# GIT_REPOSITORY "https://github.com/pybind/pybind11.git"
# GIT_TAG 05920e363edfd5d8dc6b4608820d749af5217b5f)
URL "http://www.computationalmodelbuilder.org/files/dependencies/pybind11-05920e363edfd5d8dc6b4608820d749af5217b5f.tar.bz2"
URL_MD5 48435b9c662dba020e1db0a6401d189b)
superbuild_set_revision(ftgl
# https://github.com/ulrichard/ftgl.git
URL "http://www.paraview.org/files/dependencies/ftgl-dfd7c9f0dee7f0059d5784f3a71118ae5c0afff4.tar.bz2"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment