mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix Cycles standalone and Hydra build issues in some configurations
Bring the build in sync with the Cycles standalone repo.
This commit is contained in:
parent
4f0092c1ff
commit
861debcb10
6 changed files with 25 additions and 15 deletions
|
|
@ -393,6 +393,10 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_C_COMPILER_ID MATCHES "Clang")
|
|||
unset(_has_no_error_unused_macros)
|
||||
endif()
|
||||
|
||||
if(WITH_USD)
|
||||
add_definitions(-DWITH_USD)
|
||||
endif()
|
||||
|
||||
if(WITH_CYCLES_HYDRA_RENDER_DELEGATE AND (NOT WITH_USD))
|
||||
set_and_warn_library_found("USD" WITH_USD WITH_CYCLES_HYDRA_RENDER_DELEGATE)
|
||||
endif()
|
||||
|
|
|
|||
|
|
@ -50,6 +50,16 @@ if(WITH_CYCLES_STANDALONE AND WITH_CYCLES_STANDALONE_GUI)
|
|||
list(APPEND LIB ${Epoxy_LIBRARIES} ${SDL2_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(WITH_USD)
|
||||
list(APPEND INC_SYS
|
||||
${USD_INCLUDE_DIRS}
|
||||
)
|
||||
list(APPEND LIB
|
||||
cycles_hydra
|
||||
${USD_LIBRARIES}
|
||||
)
|
||||
endif()
|
||||
|
||||
cycles_external_libraries_append(LIB)
|
||||
|
||||
# Common configuration.
|
||||
|
|
|
|||
|
|
@ -77,10 +77,11 @@ macro(cycles_external_libraries_append libraries)
|
|||
if(APPLE)
|
||||
list(APPEND ${libraries} "-framework Foundation")
|
||||
if(WITH_USD)
|
||||
list(APPEND ${libraries} "-framework CoreVideo -framework Cocoa")
|
||||
list(APPEND ${libraries} "-framework CoreVideo -framework Cocoa -framework OpenGL")
|
||||
endif()
|
||||
if(WITH_CYCLES_STANDALONE_GUI OR WITH_USD)
|
||||
list(APPEND ${libraries} "-framework OpenGL")
|
||||
elseif(WIN32)
|
||||
if(WITH_USD)
|
||||
list(APPEND ${libraries} "opengl32")
|
||||
endif()
|
||||
elseif(UNIX)
|
||||
if(WITH_USD)
|
||||
|
|
@ -121,7 +122,10 @@ macro(cycles_external_libraries_append libraries)
|
|||
list(APPEND ${libraries} ${ALEMBIC_LIBRARIES})
|
||||
endif()
|
||||
if(WITH_PATH_GUIDING)
|
||||
target_link_libraries(${target} ${OPENPGL_LIBRARIES})
|
||||
list(APPEND ${libraries} ${OPENPGL_LIBRARIES})
|
||||
endif()
|
||||
if(UNIX AND NOT APPLE)
|
||||
list(APPEND ${libraries} "-lm -lc -lutil")
|
||||
endif()
|
||||
|
||||
list(APPEND ${libraries}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ set(INC
|
|||
set(INC_SYS
|
||||
${USD_INCLUDE_DIRS}
|
||||
${Epoxy_INCLUDE_DIRS}
|
||||
${PYTHON_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(LIB
|
||||
|
|
@ -18,6 +19,7 @@ set(LIB
|
|||
cycles_session
|
||||
cycles_graph
|
||||
${Epoxy_LIBRARIES}
|
||||
${BOOST_PYTHON_LIBRARIES}
|
||||
)
|
||||
cycles_external_libraries_append(LIB)
|
||||
|
||||
|
|
|
|||
|
|
@ -804,16 +804,6 @@ if(WITH_CYCLES_DEVICE_ONEAPI)
|
|||
|
||||
get_filename_component(sycl_compiler_root ${SYCL_COMPILER} DIRECTORY)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
if(NOT WITH_CXX11_ABI)
|
||||
check_library_exists(sycl
|
||||
_ZN4sycl3_V17handler22verifyUsedKernelBundleERKSs ${sycl_compiler_root}/../lib SYCL_NO_CXX11_ABI)
|
||||
if(SYCL_NO_CXX11_ABI)
|
||||
list(APPEND sycl_compiler_flags -D_GLIBCXX_USE_CXX11_ABI=0)
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(WIN32) # Add Windows specific compiler flags.
|
||||
list(APPEND sycl_compiler_flags
|
||||
-fuse-ld=link
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ CCL_NAMESPACE_BEGIN
|
|||
|
||||
/* Blender libraries version compatible with this version */
|
||||
|
||||
#define CYCLES_BLENDER_LIBRARIES_VERSION 3.3
|
||||
#define CYCLES_BLENDER_LIBRARIES_VERSION 3.5
|
||||
|
||||
CCL_NAMESPACE_END
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue