forked from AcademySoftwareFoundation/OpenImageIO
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
32 lines (28 loc) · 944 Bytes
/
CMakeLists.txt
File metadata and controls
32 lines (28 loc) · 944 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Copyright Contributors to the OpenImageIO project.
# SPDX-License-Identifier: Apache-2.0
# https://github.com/AcademySoftwareFoundation/OpenImageIO
set (nanobind_srcs
py_oiio.cpp
py_paramvalue.cpp
py_roi.cpp
py_imagespec.cpp
py_typedesc.cpp)
set (nanobind_build_package_dir ${CMAKE_BINARY_DIR}/lib/python/nanobind/OpenImageIO)
file (MAKE_DIRECTORY ${nanobind_build_package_dir})
configure_file (__init__.py
${nanobind_build_package_dir}/__init__.py
COPYONLY)
setup_python_module_nanobind (
TARGET PyOpenImageIONanobind
MODULE _OpenImageIO
SOURCES ${nanobind_srcs}
LIBS OpenImageIO
)
if (OIIO_PYTHON_BINDINGS_BACKEND STREQUAL "nanobind")
if (SKBUILD)
install (FILES __init__.py DESTINATION . COMPONENT user)
else ()
install (FILES __init__.py
DESTINATION ${PYTHON_SITE_DIR} COMPONENT user)
endif ()
endif ()