Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2022-03-26 14:00:50 +0300
committerClément Foucault <foucault.clem@gmail.com>2022-03-26 15:16:01 +0300
commit664eb1936946a077498a17c22576763c664e3186 (patch)
tree92e72166794f971d45e53bc3bcd7387c904a0051
parent9c41767d57cd911edaa0c021f7709ea87967a155 (diff)
GPU: ShaderBuilder: Fix compilation on Mac
This is less than ideal as it seems to link against all of blender disregarding the stubs.
-rw-r--r--source/blender/gpu/CMakeLists.txt35
1 files changed, 26 insertions, 9 deletions
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)