From 4b114861c0f2e17cc59187f517f80c55adbe6f1d Mon Sep 17 00:00:00 2001 From: Sebastian Parborg Date: Fri, 1 Mar 2024 19:20:34 +0100 Subject: [PATCH] Fix: CMake LIBDIR check not working as intended after cleanup After ca8dc11a85, the LIBDIR cmake check would actually not print any warnings or error out if the LIBDIR could not be found automatically. Pull Request: https://projects.blender.org/blender/blender/pulls/118975 --- .../cmake/platform/platform_unix.cmake | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake index 989b3843855..9e737a8152c 100644 --- a/build_files/cmake/platform/platform_unix.cmake +++ b/build_files/cmake/platform/platform_unix.cmake @@ -37,22 +37,22 @@ else() unset(LIBDIR_GLIBC228_ABI) endif() - if(DEFINED LIBDIR) - if(NOT (EXISTS ${LIBDIR})) - if(WITH_STRICT_BUILD_OPTIONS) - message(SEND_ERROR - "Unable to find LIBDIR: ${LIBDIR}. " - "WITH_LIBS_PRECOMPILED needs to be able to find the LIBDIR for the precompiled libraries." - ) - else() - message(STATUS - "Unable to find LIBDIR: ${LIBDIR}. system libraries may be used " - "(disable WITH_LIBS_PRECOMPILED to suppress this message)." - ) - endif() - unset(LIBDIR) - set(WITH_LIBS_PRECOMPILED OFF) + if(NOT DEFINED LIBDIR OR NOT (EXISTS ${LIBDIR})) + if(WITH_STRICT_BUILD_OPTIONS) + message(SEND_ERROR + "Unable to find LIBDIR: ${LIBDIR}. " + "WITH_LIBS_PRECOMPILED needs to be able to find the LIBDIR for the precompiled libraries." + ) + else() + message(STATUS + "Unable to find LIBDIR: ${LIBDIR}. system libraries may be used " + "(disable WITH_LIBS_PRECOMPILED to suppress this message)." + ) endif() + if(DEFINED LIBDIR) + unset(LIBDIR) + endif() + set(WITH_LIBS_PRECOMPILED OFF) endif() endif()