[Bf-blender-cvs] [ba6e3499919] temp-lineart-embree: GPU: ShaderBuilder: Fix compilation on Mac
Clément Foucault
noreply at git.blender.org
Sat Mar 26 17:11:00 CET 2022
Commit: ba6e349991971f6b905590a9c804ee6b8fe9ecf7
Author: Clément Foucault
Date: Sat Mar 26 12:00:50 2022 +0100
Branches: temp-lineart-embree
https://developer.blender.org/rBba6e349991971f6b905590a9c804ee6b8fe9ecf7
GPU: ShaderBuilder: Fix compilation on Mac
This is less than ideal as it seems to link against all
of blender disregarding the stubs.
===================================================================
M source/blender/gpu/CMakeLists.txt
===================================================================
diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt
index 1840b5447e3..7b20a18890a 100644
--- a/source/blender/gpu/CMakeLists.txt
+++ b/source/blender/gpu/CMakeLists.txt
@@ -503,16 +503,33 @@ endif()
if(WITH_GPU_SHADER_BUILDER)
- add_executable(shader_builder
- intern/gpu_shader_builder.cc
- intern/gpu_shader_builder_stubs.cc
- ${shader_create_info_list_file}
- )
+ # TODO(@fclem) Fix this mess.
+ if(APPLE)
+ add_executable(shader_builder
+ intern/gpu_shader_builder.cc
+ ${shader_create_info_list_file}
+ )
+ else()
+ add_executable(shader_builder
+ intern/gpu_shader_builder.cc
+ intern/gpu_shader_builder_stubs.cc
+ ${shader_create_info_list_file}
+ )
+ endif()
+
+ setup_platform_linker_flags(shader_builder)
+
+ if(APPLE)
+ target_link_libraries(shader_builder PUBLIC
+ bf_blenkernel
+ buildinfoobj
+ )
+ else()
+ target_link_libraries(shader_builder PUBLIC
+ bf_blenkernel
+ )
+ endif()
- target_link_libraries(shader_builder PUBLIC
- bf_blenkernel
- ${PLATFORM_LINKLIBS}
- )
target_include_directories(shader_builder PRIVATE ${INC} ${CMAKE_CURRENT_BINARY_DIR})
set(SRC_BAKED_CREATE_INFOS_FILE ${CMAKE_CURRENT_BINARY_DIR}/shader_baked.hh)
More information about the Bf-blender-cvs
mailing list