x11_egl: only append library path if it's not empty
authorIván Briano <ivan.briano@intel.com>
Mon, 11 Oct 2021 19:45:24 +0000 (12:45 -0700)
committerMatthew Netsch <quic_mnetsch@quicinc.com>
Thu, 28 Oct 2021 21:44:48 +0000 (21:44 +0000)
Pkg-config will strip out any -L if they match the default search
directory, so we ended up with a -L and no arguments to it, that would
consume whatever came next.

Components: EGL

VK-GL-CTS issue: 2726

Change-Id: Iba0f7d8e0a4ab66e5fd369f60e4d04ac5420df65

targets/x11_egl/x11_egl.cmake

index 6967313..35ce9c3 100644 (file)
@@ -38,7 +38,9 @@ PKG_CHECK_MODULES(GLES1 glesv1_cm)
 if (GLES1_LIBRARIES)
        set(DEQP_SUPPORT_GLES1  ON)
        set(DEQP_GLES1_LIBRARIES ${GLES1_LIBRARIES})
-       set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${GLES1_LIBRARY_DIRS}")
+       if (GLES1_LIBRARY_DIRS)
+               set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L${GLES1_LIBRARY_DIRS}")
+       endif (GLES1_LIBRARY_DIRS)
        include_directories(${GLES1_INCLUDE_DIRS})
 endif (GLES1_LIBRARIES)