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
This commit is contained in:
Sebastian Parborg 2024-03-01 19:20:34 +01:00 committed by Gitea
parent c1b5d9d6bd
commit 4b114861c0
1 changed files with 15 additions and 15 deletions

View File

@ -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()