2023-08-16 00:20:26 +10:00
|
|
|
# SPDX-FileCopyrightText: 2011-2022 Blender Authors
|
2023-08-04 15:10:48 +02:00
|
|
|
#
|
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
|
|
# This suppresses the warning "This file includes at least one deprecated or antiquated
|
|
|
|
|
# header which may be removed without further notice at a future date", which is caused
|
|
|
|
|
# by the USD library including <ext/hash_set> on Linux. This has been reported at:
|
|
|
|
|
# https://github.com/PixarAnimationStudios/USD/issues/1057.
|
|
|
|
|
if(UNIX AND NOT APPLE)
|
|
|
|
|
add_definitions(-D_GLIBCXX_PERMIT_BACKWARD_HASH)
|
|
|
|
|
endif()
|
|
|
|
|
if(WIN32)
|
|
|
|
|
add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN -DBOOST_DEBUG_PYTHON)
|
|
|
|
|
endif()
|
|
|
|
|
add_definitions(-DBOOST_ALL_NO_LIB)
|
|
|
|
|
|
2024-09-20 13:14:57 +10:00
|
|
|
# Pre-compiled Linux libraries are made with GCC, and USD uses some extensions
|
2023-08-04 15:10:48 +02:00
|
|
|
# which lead to an incompatible ABI for Clang. Using those extensions with
|
|
|
|
|
# Clang as well works around the issue.
|
|
|
|
|
if(UNIX AND NOT APPLE)
|
2024-03-07 19:56:58 +11:00
|
|
|
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
2024-03-01 16:22:06 +11:00
|
|
|
if(DEFINED LIBDIR)
|
2023-08-04 15:10:48 +02:00
|
|
|
add_definitions(-DARCH_HAS_GNU_STL_EXTENSIONS)
|
|
|
|
|
endif()
|
|
|
|
|
endif()
|
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
# USD headers use deprecated TBB headers, silence warning.
|
|
|
|
|
add_definitions(-DTBB_SUPPRESS_DEPRECATED_MESSAGES=1)
|
|
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
|
# Some USD library headers trigger the "unreferenced formal parameter"
|
|
|
|
|
# warning alert.
|
|
|
|
|
# Silence them by restore warn C4100 back to w4
|
|
|
|
|
remove_cc_flag("/w34100")
|
2024-03-07 17:56:41 +11:00
|
|
|
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
|
2024-03-06 15:46:43 +01:00
|
|
|
# USD currently does not support the new preprocessor,
|
2024-05-02 20:05:51 +02:00
|
|
|
# so we remove it here and disable sse2neon
|
2024-03-06 15:46:43 +01:00
|
|
|
remove_cc_flag("/Zc:preprocessor")
|
2024-05-02 20:05:51 +02:00
|
|
|
add_definitions(-DDISABLE_SSE2NEON)
|
2024-03-06 15:46:43 +01:00
|
|
|
endif()
|
2023-08-04 15:10:48 +02:00
|
|
|
endif()
|
|
|
|
|
|
|
|
|
|
set(INC
|
|
|
|
|
../../../../intern/guardedalloc
|
|
|
|
|
../../blenlib
|
2023-08-24 11:38:41 +10:00
|
|
|
../../makesdna
|
2025-01-02 19:56:24 +01:00
|
|
|
../../makesrna
|
2023-08-04 15:10:48 +02:00
|
|
|
../../io/usd
|
|
|
|
|
../../gpu/intern
|
|
|
|
|
../../python/intern
|
2025-01-02 19:56:24 +01:00
|
|
|
# RNA_prototypes.hh
|
|
|
|
|
${CMAKE_BINARY_DIR}/source/blender/makesrna
|
2023-08-04 15:10:48 +02:00
|
|
|
..
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
set(INC_SYS
|
|
|
|
|
${PYTHON_INCLUDE_DIRS}
|
|
|
|
|
${Epoxy_INCLUDE_DIRS}
|
|
|
|
|
${USD_INCLUDE_DIRS}
|
|
|
|
|
${BOOST_INCLUDE_DIR}
|
|
|
|
|
${TBB_INCLUDE_DIR}
|
|
|
|
|
${GFLAGS_INCLUDE_DIRS}
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
set(LIB
|
|
|
|
|
${Epoxy_LIBRARIES}
|
|
|
|
|
${PYTHON_LIBRARIES}
|
|
|
|
|
${USD_LIBRARIES}
|
|
|
|
|
${TBB_LIBRARIES}
|
2024-12-23 20:08:37 +01:00
|
|
|
PRIVATE bf::blenkernel
|
2023-11-25 22:51:59 +01:00
|
|
|
PRIVATE bf::depsgraph
|
2024-12-23 21:38:19 +01:00
|
|
|
PRIVATE bf::gpu
|
2024-12-25 23:32:15 +01:00
|
|
|
PRIVATE bf::imbuf
|
2023-11-24 17:12:24 +01:00
|
|
|
PRIVATE bf::intern::clog
|
2023-09-23 20:22:19 +10:00
|
|
|
bf_io_usd
|
2024-12-26 19:52:49 +01:00
|
|
|
PRIVATE bf::nodes
|
2025-04-02 02:59:02 +02:00
|
|
|
PRIVATE bf::dependencies::eigen
|
2023-08-04 15:10:48 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
set(SRC
|
2023-11-15 19:03:22 +01:00
|
|
|
camera.cc
|
2023-08-04 15:10:48 +02:00
|
|
|
engine.cc
|
|
|
|
|
final_engine.cc
|
|
|
|
|
light_tasks_delegate.cc
|
|
|
|
|
preview_engine.cc
|
|
|
|
|
python.cc
|
|
|
|
|
render_task_delegate.cc
|
|
|
|
|
viewport_engine.cc
|
|
|
|
|
|
2024-02-05 19:37:57 +01:00
|
|
|
camera.hh
|
|
|
|
|
engine.hh
|
|
|
|
|
final_engine.hh
|
|
|
|
|
light_tasks_delegate.hh
|
|
|
|
|
preview_engine.hh
|
|
|
|
|
render_task_delegate.hh
|
|
|
|
|
settings.hh
|
|
|
|
|
viewport_engine.hh
|
2023-08-04 15:10:48 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
blender_add_lib(bf_render_hydra "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
|
2025-01-02 19:56:24 +01:00
|
|
|
|
|
|
|
|
# RNA_prototypes.hh
|
|
|
|
|
add_dependencies(bf_render_hydra bf_rna)
|