forked from bartvdbraak/blender
Cleanup: indentation for CMake files
Also minor white-space & case changes.
This commit is contained in:
parent
9f6b19526d
commit
ebd0e76088
@ -685,7 +685,7 @@ if(WIN32 OR XCODE)
|
|||||||
option(IDE_GROUP_PROJECTS_IN_FOLDERS "Organize the projects according to source folder structure." ON)
|
option(IDE_GROUP_PROJECTS_IN_FOLDERS "Organize the projects according to source folder structure." ON)
|
||||||
mark_as_advanced(IDE_GROUP_PROJECTS_IN_FOLDERS)
|
mark_as_advanced(IDE_GROUP_PROJECTS_IN_FOLDERS)
|
||||||
|
|
||||||
if (IDE_GROUP_PROJECTS_IN_FOLDERS)
|
if(IDE_GROUP_PROJECTS_IN_FOLDERS)
|
||||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
@ -1197,21 +1197,21 @@ endfunction()
|
|||||||
macro(openmp_delayload
|
macro(openmp_delayload
|
||||||
projectname
|
projectname
|
||||||
)
|
)
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
if(WITH_OPENMP)
|
if(WITH_OPENMP)
|
||||||
if(MSVC_CLANG)
|
if(MSVC_CLANG)
|
||||||
set(OPENMP_DLL_NAME "libomp")
|
set(OPENMP_DLL_NAME "libomp")
|
||||||
elseif(MSVC_VERSION EQUAL 1800)
|
elseif(MSVC_VERSION EQUAL 1800)
|
||||||
set(OPENMP_DLL_NAME "vcomp120")
|
set(OPENMP_DLL_NAME "vcomp120")
|
||||||
else()
|
else()
|
||||||
set(OPENMP_DLL_NAME "vcomp140")
|
set(OPENMP_DLL_NAME "vcomp140")
|
||||||
endif()
|
|
||||||
set_property(TARGET ${projectname} APPEND_STRING PROPERTY LINK_FLAGS_RELEASE " /DELAYLOAD:${OPENMP_DLL_NAME}.dll delayimp.lib")
|
|
||||||
set_property(TARGET ${projectname} APPEND_STRING PROPERTY LINK_FLAGS_DEBUG " /DELAYLOAD:${OPENMP_DLL_NAME}d.dll delayimp.lib")
|
|
||||||
set_property(TARGET ${projectname} APPEND_STRING PROPERTY LINK_FLAGS_RELWITHDEBINFO " /DELAYLOAD:${OPENMP_DLL_NAME}.dll delayimp.lib")
|
|
||||||
set_property(TARGET ${projectname} APPEND_STRING PROPERTY LINK_FLAGS_MINSIZEREL " /DELAYLOAD:${OPENMP_DLL_NAME}.dll delayimp.lib")
|
|
||||||
endif()
|
endif()
|
||||||
|
set_property(TARGET ${projectname} APPEND_STRING PROPERTY LINK_FLAGS_RELEASE " /DELAYLOAD:${OPENMP_DLL_NAME}.dll delayimp.lib")
|
||||||
|
set_property(TARGET ${projectname} APPEND_STRING PROPERTY LINK_FLAGS_DEBUG " /DELAYLOAD:${OPENMP_DLL_NAME}d.dll delayimp.lib")
|
||||||
|
set_property(TARGET ${projectname} APPEND_STRING PROPERTY LINK_FLAGS_RELWITHDEBINFO " /DELAYLOAD:${OPENMP_DLL_NAME}.dll delayimp.lib")
|
||||||
|
set_property(TARGET ${projectname} APPEND_STRING PROPERTY LINK_FLAGS_MINSIZEREL " /DELAYLOAD:${OPENMP_DLL_NAME}.dll delayimp.lib")
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
macro(set_and_warn_dependency
|
macro(set_and_warn_dependency
|
||||||
|
2
extern/CMakeLists.txt
vendored
2
extern/CMakeLists.txt
vendored
@ -113,6 +113,6 @@ if(WITH_MOD_FLUID)
|
|||||||
add_subdirectory(mantaflow)
|
add_subdirectory(mantaflow)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (WITH_COMPOSITOR)
|
if(WITH_COMPOSITOR)
|
||||||
add_subdirectory(smaa_areatex)
|
add_subdirectory(smaa_areatex)
|
||||||
endif()
|
endif()
|
||||||
|
@ -559,10 +559,10 @@ if(WITH_CYCLES_DEVICE_METAL)
|
|||||||
find_library(METAL_LIBRARY Metal)
|
find_library(METAL_LIBRARY Metal)
|
||||||
|
|
||||||
# This file was added in the 12.0 SDK, use it as a way to detect the version.
|
# This file was added in the 12.0 SDK, use it as a way to detect the version.
|
||||||
if (METAL_LIBRARY AND NOT EXISTS "${METAL_LIBRARY}/Headers/MTLFunctionStitching.h")
|
if(METAL_LIBRARY AND NOT EXISTS "${METAL_LIBRARY}/Headers/MTLFunctionStitching.h")
|
||||||
message(STATUS "Metal version too old, must be SDK 12.0 or newer, disabling WITH_CYCLES_DEVICE_METAL")
|
message(STATUS "Metal version too old, must be SDK 12.0 or newer, disabling WITH_CYCLES_DEVICE_METAL")
|
||||||
set(WITH_CYCLES_DEVICE_METAL OFF)
|
set(WITH_CYCLES_DEVICE_METAL OFF)
|
||||||
elseif (NOT METAL_LIBRARY)
|
elseif(NOT METAL_LIBRARY)
|
||||||
message(STATUS "Metal not found, disabling WITH_CYCLES_DEVICE_METAL")
|
message(STATUS "Metal not found, disabling WITH_CYCLES_DEVICE_METAL")
|
||||||
set(WITH_CYCLES_DEVICE_METAL OFF)
|
set(WITH_CYCLES_DEVICE_METAL OFF)
|
||||||
else()
|
else()
|
||||||
|
@ -291,7 +291,7 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND)
|
|||||||
include(CheckSymbolExists)
|
include(CheckSymbolExists)
|
||||||
set(CMAKE_REQUIRED_DEFINITIONS "-D_GNU_SOURCE")
|
set(CMAKE_REQUIRED_DEFINITIONS "-D_GNU_SOURCE")
|
||||||
check_symbol_exists(memfd_create "sys/mman.h" HAVE_MEMFD_CREATE)
|
check_symbol_exists(memfd_create "sys/mman.h" HAVE_MEMFD_CREATE)
|
||||||
if (HAVE_MEMFD_CREATE)
|
if(HAVE_MEMFD_CREATE)
|
||||||
add_definitions(-DHAVE_MEMFD_CREATE)
|
add_definitions(-DHAVE_MEMFD_CREATE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -307,7 +307,7 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND)
|
|||||||
pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner)
|
pkg_get_variable(WAYLAND_SCANNER wayland-scanner wayland_scanner)
|
||||||
|
|
||||||
pkg_check_modules(wayland-protocols wayland-protocols>=1.15)
|
pkg_check_modules(wayland-protocols wayland-protocols>=1.15)
|
||||||
if (${wayland-protocols_FOUND})
|
if(${wayland-protocols_FOUND})
|
||||||
pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
|
pkg_get_variable(WAYLAND_PROTOCOLS_DIR wayland-protocols pkgdatadir)
|
||||||
else()
|
else()
|
||||||
find_path(WAYLAND_PROTOCOLS_DIR
|
find_path(WAYLAND_PROTOCOLS_DIR
|
||||||
@ -316,7 +316,7 @@ elseif(WITH_GHOST_X11 OR WITH_GHOST_WAYLAND)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (NOT EXISTS ${WAYLAND_PROTOCOLS_DIR})
|
if(NOT EXISTS ${WAYLAND_PROTOCOLS_DIR})
|
||||||
message(FATAL_ERROR "path to wayland-protocols not found")
|
message(FATAL_ERROR "path to wayland-protocols not found")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -518,11 +518,11 @@ if(WITH_XR_OPENXR)
|
|||||||
)
|
)
|
||||||
elseif(UNIX AND NOT APPLE)
|
elseif(UNIX AND NOT APPLE)
|
||||||
list(APPEND XR_PLATFORM_DEFINES -DXR_OS_LINUX)
|
list(APPEND XR_PLATFORM_DEFINES -DXR_OS_LINUX)
|
||||||
if (WITH_GHOST_WAYLAND)
|
if(WITH_GHOST_WAYLAND)
|
||||||
list(APPEND XR_PLATFORM_DEFINES -DXR_USE_PLATFORM_WAYLAND)
|
list(APPEND XR_PLATFORM_DEFINES -DXR_USE_PLATFORM_WAYLAND)
|
||||||
endif()
|
endif()
|
||||||
if (WITH_GHOST_X11)
|
if(WITH_GHOST_X11)
|
||||||
if (WITH_GL_EGL)
|
if(WITH_GL_EGL)
|
||||||
list(APPEND XR_PLATFORM_DEFINES -DXR_USE_PLATFORM_EGL)
|
list(APPEND XR_PLATFORM_DEFINES -DXR_USE_PLATFORM_EGL)
|
||||||
else()
|
else()
|
||||||
list(APPEND XR_PLATFORM_DEFINES -DXR_USE_PLATFORM_XLIB)
|
list(APPEND XR_PLATFORM_DEFINES -DXR_USE_PLATFORM_XLIB)
|
||||||
|
@ -27,7 +27,7 @@ if(WITH_CLANG_TIDY AND NOT MSVC)
|
|||||||
message(WARNING "Currently Clang-Tidy might fail with GCC toolchain, switch to Clang toolchain if that happens")
|
message(WARNING "Currently Clang-Tidy might fail with GCC toolchain, switch to Clang toolchain if that happens")
|
||||||
if(COMMAND target_precompile_headers)
|
if(COMMAND target_precompile_headers)
|
||||||
message(STATUS "Clang-Tidy and GCC precompiled headers are incompatible, disabling precompiled headers")
|
message(STATUS "Clang-Tidy and GCC precompiled headers are incompatible, disabling precompiled headers")
|
||||||
set(CMAKE_DISABLE_PRECOMPILE_HEADERS On)
|
set(CMAKE_DISABLE_PRECOMPILE_HEADERS ON)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -363,8 +363,8 @@ if(WITH_GMP)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
if (WITH_BLENDER_THUMBNAILER)
|
if(WITH_BLENDER_THUMBNAILER)
|
||||||
# Needed for querying the thumbnailer .dll in winstuff.c
|
# Needed for querying the `thumbnailer .dll` in `winstuff.c`.
|
||||||
add_definitions(-DWITH_BLENDER_THUMBNAILER)
|
add_definitions(-DWITH_BLENDER_THUMBNAILER)
|
||||||
endif()
|
endif()
|
||||||
list(APPEND INC
|
list(APPEND INC
|
||||||
|
@ -402,57 +402,57 @@ list(APPEND SRC ${glsl_source_list_file})
|
|||||||
list(APPEND INC ${CMAKE_CURRENT_BINARY_DIR})
|
list(APPEND INC ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
set(SHADER_CREATE_INFOS
|
set(SHADER_CREATE_INFOS
|
||||||
../draw/engines/workbench/shaders/infos/workbench_composite_info.hh
|
../draw/engines/workbench/shaders/infos/workbench_composite_info.hh
|
||||||
../draw/engines/workbench/shaders/infos/workbench_effect_antialiasing_info.hh
|
../draw/engines/workbench/shaders/infos/workbench_effect_antialiasing_info.hh
|
||||||
../draw/engines/workbench/shaders/infos/workbench_effect_cavity_info.hh
|
../draw/engines/workbench/shaders/infos/workbench_effect_cavity_info.hh
|
||||||
../draw/engines/workbench/shaders/infos/workbench_effect_dof_info.hh
|
../draw/engines/workbench/shaders/infos/workbench_effect_dof_info.hh
|
||||||
../draw/engines/workbench/shaders/infos/workbench_effect_outline_info.hh
|
../draw/engines/workbench/shaders/infos/workbench_effect_outline_info.hh
|
||||||
../draw/engines/workbench/shaders/infos/workbench_merge_infront_info.hh
|
../draw/engines/workbench/shaders/infos/workbench_merge_infront_info.hh
|
||||||
../draw/engines/workbench/shaders/infos/workbench_prepass_info.hh
|
../draw/engines/workbench/shaders/infos/workbench_prepass_info.hh
|
||||||
../draw/engines/workbench/shaders/infos/workbench_shadow_info.hh
|
../draw/engines/workbench/shaders/infos/workbench_shadow_info.hh
|
||||||
../draw/engines/workbench/shaders/infos/workbench_transparent_resolve_info.hh
|
../draw/engines/workbench/shaders/infos/workbench_transparent_resolve_info.hh
|
||||||
../draw/engines/workbench/shaders/infos/workbench_volume_info.hh
|
../draw/engines/workbench/shaders/infos/workbench_volume_info.hh
|
||||||
../draw/intern/shaders/draw_fullscreen_info.hh
|
../draw/intern/shaders/draw_fullscreen_info.hh
|
||||||
../draw/intern/shaders/draw_object_infos_info.hh
|
../draw/intern/shaders/draw_object_infos_info.hh
|
||||||
../draw/intern/shaders/draw_view_info.hh
|
../draw/intern/shaders/draw_view_info.hh
|
||||||
../draw/intern/shaders/draw_hair_refine_info.hh
|
../draw/intern/shaders/draw_hair_refine_info.hh
|
||||||
|
|
||||||
shaders/infos/gpu_clip_planes_info.hh
|
shaders/infos/gpu_clip_planes_info.hh
|
||||||
shaders/infos/gpu_shader_2D_area_borders_info.hh
|
shaders/infos/gpu_shader_2D_area_borders_info.hh
|
||||||
shaders/infos/gpu_shader_2D_checker_info.hh
|
shaders/infos/gpu_shader_2D_checker_info.hh
|
||||||
shaders/infos/gpu_shader_2D_diag_stripes_info.hh
|
shaders/infos/gpu_shader_2D_diag_stripes_info.hh
|
||||||
shaders/infos/gpu_shader_2D_flat_color_info.hh
|
shaders/infos/gpu_shader_2D_flat_color_info.hh
|
||||||
shaders/infos/gpu_shader_2D_image_color_info.hh
|
shaders/infos/gpu_shader_2D_image_color_info.hh
|
||||||
shaders/infos/gpu_shader_2D_image_desaturate_color_info.hh
|
shaders/infos/gpu_shader_2D_image_desaturate_color_info.hh
|
||||||
shaders/infos/gpu_shader_2D_image_info.hh
|
shaders/infos/gpu_shader_2D_image_info.hh
|
||||||
shaders/infos/gpu_shader_2D_image_multi_rect_color_info.hh
|
shaders/infos/gpu_shader_2D_image_multi_rect_color_info.hh
|
||||||
shaders/infos/gpu_shader_2D_image_overlays_merge_info.hh
|
shaders/infos/gpu_shader_2D_image_overlays_merge_info.hh
|
||||||
shaders/infos/gpu_shader_2D_image_overlays_stereo_merge_info.hh
|
shaders/infos/gpu_shader_2D_image_overlays_stereo_merge_info.hh
|
||||||
shaders/infos/gpu_shader_2D_image_rect_color_info.hh
|
shaders/infos/gpu_shader_2D_image_rect_color_info.hh
|
||||||
shaders/infos/gpu_shader_2D_image_shuffle_color_info.hh
|
shaders/infos/gpu_shader_2D_image_shuffle_color_info.hh
|
||||||
shaders/infos/gpu_shader_2D_nodelink_info.hh
|
shaders/infos/gpu_shader_2D_nodelink_info.hh
|
||||||
shaders/infos/gpu_shader_2D_point_uniform_size_uniform_color_aa_info.hh
|
shaders/infos/gpu_shader_2D_point_uniform_size_uniform_color_aa_info.hh
|
||||||
shaders/infos/gpu_shader_2D_point_uniform_size_uniform_color_outline_aa_info.hh
|
shaders/infos/gpu_shader_2D_point_uniform_size_uniform_color_outline_aa_info.hh
|
||||||
shaders/infos/gpu_shader_2D_point_varying_size_varying_color_info.hh
|
shaders/infos/gpu_shader_2D_point_varying_size_varying_color_info.hh
|
||||||
shaders/infos/gpu_shader_2D_smooth_color_info.hh
|
shaders/infos/gpu_shader_2D_smooth_color_info.hh
|
||||||
shaders/infos/gpu_shader_2D_uniform_color_info.hh
|
shaders/infos/gpu_shader_2D_uniform_color_info.hh
|
||||||
shaders/infos/gpu_shader_3D_depth_only_info.hh
|
shaders/infos/gpu_shader_3D_depth_only_info.hh
|
||||||
shaders/infos/gpu_shader_3D_flat_color_info.hh
|
shaders/infos/gpu_shader_3D_flat_color_info.hh
|
||||||
shaders/infos/gpu_shader_3D_image_modulate_alpha_info.hh
|
shaders/infos/gpu_shader_3D_image_modulate_alpha_info.hh
|
||||||
shaders/infos/gpu_shader_3D_point_info.hh
|
shaders/infos/gpu_shader_3D_point_info.hh
|
||||||
shaders/infos/gpu_shader_3D_smooth_color_info.hh
|
shaders/infos/gpu_shader_3D_smooth_color_info.hh
|
||||||
shaders/infos/gpu_shader_3D_uniform_color_info.hh
|
shaders/infos/gpu_shader_3D_uniform_color_info.hh
|
||||||
shaders/infos/gpu_shader_gpencil_stroke_info.hh
|
shaders/infos/gpu_shader_gpencil_stroke_info.hh
|
||||||
shaders/infos/gpu_shader_instance_varying_color_varying_size_info.hh
|
shaders/infos/gpu_shader_instance_varying_color_varying_size_info.hh
|
||||||
shaders/infos/gpu_shader_keyframe_shape_info.hh
|
shaders/infos/gpu_shader_keyframe_shape_info.hh
|
||||||
shaders/infos/gpu_shader_simple_lighting_info.hh
|
shaders/infos/gpu_shader_simple_lighting_info.hh
|
||||||
shaders/infos/gpu_shader_text_info.hh
|
shaders/infos/gpu_shader_text_info.hh
|
||||||
shaders/infos/gpu_srgb_to_framebuffer_space_info.hh
|
shaders/infos/gpu_srgb_to_framebuffer_space_info.hh
|
||||||
)
|
)
|
||||||
|
|
||||||
set(SHADER_CREATE_INFOS_CONTENT "")
|
set(SHADER_CREATE_INFOS_CONTENT "")
|
||||||
foreach(DESCRIPTOR_FILE ${SHADER_CREATE_INFOS})
|
foreach(DESCRIPTOR_FILE ${SHADER_CREATE_INFOS})
|
||||||
string(APPEND SHADER_CREATE_INFOS_CONTENT "#include \"${DESCRIPTOR_FILE}\"\n")
|
string(APPEND SHADER_CREATE_INFOS_CONTENT "#include \"${DESCRIPTOR_FILE}\"\n")
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
set(shader_create_info_list_file "${CMAKE_CURRENT_BINARY_DIR}/gpu_shader_create_info_list.hh")
|
set(shader_create_info_list_file "${CMAKE_CURRENT_BINARY_DIR}/gpu_shader_create_info_list.hh")
|
||||||
|
@ -692,7 +692,7 @@ if(WITH_CYCLES OR WITH_OPENGL_RENDER_TESTS)
|
|||||||
|
|
||||||
foreach(render_test ${_cycles_render_tests})
|
foreach(render_test ${_cycles_render_tests})
|
||||||
# Enable just one simple test for Metal until more tests are passing.
|
# Enable just one simple test for Metal until more tests are passing.
|
||||||
if ((NOT (_cycles_device MATCHES "METAL")) OR (render_test MATCHES "camera"))
|
if((NOT (_cycles_device MATCHES "METAL")) OR (render_test MATCHES "camera"))
|
||||||
add_python_test(
|
add_python_test(
|
||||||
cycles_${render_test}_${_cycles_device_lower}
|
cycles_${render_test}_${_cycles_device_lower}
|
||||||
${CMAKE_CURRENT_LIST_DIR}/cycles_render_tests.py
|
${CMAKE_CURRENT_LIST_DIR}/cycles_render_tests.py
|
||||||
|
Loading…
Reference in New Issue
Block a user