diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake index 9e737a8152c..68f4b6a36ca 100644 --- a/build_files/cmake/platform/platform_unix.cmake +++ b/build_files/cmake/platform/platform_unix.cmake @@ -37,21 +37,22 @@ else() unset(LIBDIR_GLIBC228_ABI) endif() - if(NOT DEFINED LIBDIR OR NOT (EXISTS ${LIBDIR})) + if(NOT DEFINED LIBDIR) + set(LIBDIR "") # Suppress undefined warnings, allow printing even if empty. + endif() + if((LIBDIR STREQUAL "") OR (NOT (EXISTS "${LIBDIR}"))) if(WITH_STRICT_BUILD_OPTIONS) message(SEND_ERROR - "Unable to find LIBDIR: ${LIBDIR}. " + "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 " + "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() + unset(LIBDIR) set(WITH_LIBS_PRECOMPILED OFF) endif() endif()