Commit 3cb51dae authored by T.J. Corona's avatar T.J. Corona

Add pybind11 to SMTK exports if it is enabled.

parent e716d452
Pipeline #79887 passed with stage
......@@ -13,6 +13,11 @@ if(IS_DIRECTORY "${smtk_module_dir}")
endif()
unset(smtk_module_dir)
set(SMTK_HAS_PYTHON @SMTK_USE_PYBIND11@)
if (SMTK_HAS_PYTHON)
find_package(pybind11 REQUIRED)
endif ()
#When building documentation internally we re-import ourselves, which
#doesnt work and generates CMake warnings. So we will only look for SMTK
#if the smtkCore target doesn't already exist
......
......@@ -60,7 +60,7 @@ set(smtkCore_private_link_libraries
)
if(SMTK_USE_PYBIND11)
list(APPEND smtkCore_private_link_libraries
list(APPEND smtkCore_public_link_libraries
pybind11::embed
)
add_subdirectory(pybind11)
......@@ -107,7 +107,6 @@ install(
FILES
AutoInit.h
PublicPointerDefs.h
PythonAutoInit.h
SharedFromThis.h
SharedPtr.h
SystemConfig.h
......@@ -119,6 +118,16 @@ install(
# Generate Python wrapping of the smtkCore library
if (SMTK_USE_PYBIND11)
#only install PythonAutoInit.h if pybind11 is enabled, since it directly
#includes pybind11 headers
install(
FILES
PythonAutoInit.h
DESTINATION
include/smtk/${SMTK_VERSION}/smtk
)
set(SMTK_PYTHON_MODULE_SRCS
simple
testing
......
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