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:
authorBrecht Van Lommel <brecht@blender.org>2022-09-29 20:01:35 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-10-21 21:04:47 +0300
commite7a6917617fbb4f3c224ad89e6a63bedf56e6553 (patch)
tree74b74602bae4f332cfb59e42895759997f286492 /build_files/cmake/platform/platform_win32.cmake
parentebe231969294924ff057f5d999d05986f9c97352 (diff)
Build: add option to error when features can't be enabled
This is to help ensure buildbot builds are correct, while still gracefully disabling features in user/developer builds. * Add WITH_STRICT_BUILD_OPTIONS to give an error when features can't be enabled due to missing libraries or other reasons. Add new macro set_and_warn_library_found used everywhere features were being automatically disabled. * Remove code from Windows and macOS for various libraries that would automatically disable features. set_and_warn_library_found could be used here also, but we are generally assuming the precompiled libraries are complete and only test for availability when libraries are just added. Differential Revision: https://developer.blender.org/D16104
Diffstat (limited to 'build_files/cmake/platform/platform_win32.cmake')
-rw-r--r--build_files/cmake/platform/platform_win32.cmake59
1 files changed, 17 insertions, 42 deletions
diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake
index 2816446164a..3818076634a 100644
--- a/build_files/cmake/platform/platform_win32.cmake
+++ b/build_files/cmake/platform/platform_win32.cmake
@@ -326,18 +326,10 @@ if(WITH_FFTW3)
endif()
if(WITH_IMAGE_WEBP)
- windows_find_package(WebP)
- if(NOT WEBP_FOUND)
- if(EXISTS ${LIBDIR}/webp)
- set(WEBP_INCLUDE_DIRS ${LIBDIR}/webp/include)
- set(WEBP_ROOT_DIR ${LIBDIR}/webp)
- set(WEBP_LIBRARIES ${LIBDIR}/webp/lib/webp.lib ${LIBDIR}/webp/lib/webpdemux.lib ${LIBDIR}/webp/lib/webpmux.lib)
- set(WEBP_FOUND ON)
- else()
- message(STATUS "WITH_IMAGE_WEBP is ON but WEBP libraries are not found, setting WITH_IMAGE_WEBP=OFF")
- set(WITH_IMAGE_WEBP OFF)
- endif()
- endif()
+ set(WEBP_INCLUDE_DIRS ${LIBDIR}/webp/include)
+ set(WEBP_ROOT_DIR ${LIBDIR}/webp)
+ set(WEBP_LIBRARIES ${LIBDIR}/webp/lib/webp.lib ${LIBDIR}/webp/lib/webpdemux.lib ${LIBDIR}/webp/lib/webpmux.lib)
+ set(WEBP_FOUND ON)
endif()
if(WITH_OPENCOLLADA)
@@ -792,13 +784,6 @@ if(WITH_CYCLES AND WITH_CYCLES_OSL)
endif()
find_path(OSL_INCLUDE_DIR OSL/oslclosure.h PATHS ${CYCLES_OSL}/include)
find_program(OSL_COMPILER NAMES oslc PATHS ${CYCLES_OSL}/bin)
-
- if(OSL_INCLUDE_DIR AND OSL_LIBRARIES AND OSL_COMPILER)
- set(OSL_FOUND TRUE)
- else()
- message(STATUS "OSL not found")
- set(WITH_CYCLES_OSL OFF)
- endif()
endif()
if(WITH_CYCLES AND WITH_CYCLES_EMBREE)
@@ -898,21 +883,16 @@ if(WINDOWS_PYTHON_DEBUG)
endif()
if(WITH_XR_OPENXR)
- if(EXISTS ${LIBDIR}/xr_openxr_sdk)
- set(XR_OPENXR_SDK ${LIBDIR}/xr_openxr_sdk)
- set(XR_OPENXR_SDK_LIBPATH ${LIBDIR}/xr_openxr_sdk/lib)
- set(XR_OPENXR_SDK_INCLUDE_DIR ${XR_OPENXR_SDK}/include)
- # This is the old name of this library, it is checked to
- # support the transition between the old and new lib versions
- # this can be removed after the next lib update.
- if(EXISTS ${XR_OPENXR_SDK_LIBPATH}/openxr_loader_d.lib)
- set(XR_OPENXR_SDK_LIBRARIES optimized ${XR_OPENXR_SDK_LIBPATH}/openxr_loader.lib debug ${XR_OPENXR_SDK_LIBPATH}/openxr_loader_d.lib)
- else()
- set(XR_OPENXR_SDK_LIBRARIES optimized ${XR_OPENXR_SDK_LIBPATH}/openxr_loader.lib debug ${XR_OPENXR_SDK_LIBPATH}/openxr_loaderd.lib)
- endif()
+ set(XR_OPENXR_SDK ${LIBDIR}/xr_openxr_sdk)
+ set(XR_OPENXR_SDK_LIBPATH ${LIBDIR}/xr_openxr_sdk/lib)
+ set(XR_OPENXR_SDK_INCLUDE_DIR ${XR_OPENXR_SDK}/include)
+ # This is the old name of this library, it is checked to
+ # support the transition between the old and new lib versions
+ # this can be removed after the next lib update.
+ if(EXISTS ${XR_OPENXR_SDK_LIBPATH}/openxr_loader_d.lib)
+ set(XR_OPENXR_SDK_LIBRARIES optimized ${XR_OPENXR_SDK_LIBPATH}/openxr_loader.lib debug ${XR_OPENXR_SDK_LIBPATH}/openxr_loader_d.lib)
else()
- message(WARNING "OpenXR-SDK was not found, disabling WITH_XR_OPENXR")
- set(WITH_XR_OPENXR OFF)
+ set(XR_OPENXR_SDK_LIBRARIES optimized ${XR_OPENXR_SDK_LIBPATH}/openxr_loader.lib debug ${XR_OPENXR_SDK_LIBPATH}/openxr_loaderd.lib)
endif()
endif()
@@ -930,15 +910,10 @@ if(WITH_POTRACE)
endif()
if(WITH_HARU)
- if(EXISTS ${LIBDIR}/haru)
- set(HARU_FOUND ON)
- set(HARU_ROOT_DIR ${LIBDIR}/haru)
- set(HARU_INCLUDE_DIRS ${HARU_ROOT_DIR}/include)
- set(HARU_LIBRARIES ${HARU_ROOT_DIR}/lib/libhpdfs.lib)
- else()
- message(WARNING "Haru was not found, disabling WITH_HARU")
- set(WITH_HARU OFF)
- endif()
+ set(HARU_FOUND ON)
+ set(HARU_ROOT_DIR ${LIBDIR}/haru)
+ set(HARU_INCLUDE_DIRS ${HARU_ROOT_DIR}/include)
+ set(HARU_LIBRARIES ${HARU_ROOT_DIR}/lib/libhpdfs.lib)
endif()
if(WITH_CYCLES AND WITH_CYCLES_PATH_GUIDING)