• Daniel Diaz's avatar
    CMake: define GBM_BO_MAP only when symbol is found · 2217871a
    Daniel Diaz authored
    gbm_bo_map() and _unmap() have been added recently to Mesa,
    and this update may not have reached all implementations of
    GBM, such as the one provided by Mali r6, where said
    definitions can be found in the header file but not in the
    library itself. This leads to errors like the following when
      ../../../../lib/libpiglitutil_gl.so.0: undefined reference to `gbm_bo_unmap'
      ../../../../lib/libpiglitutil_gl.so.0: undefined reference to `gbm_bo_map'
      collect2: error: ld returned 1 exit status
      make[2]: *** [bin/point-sprite] Error 1
    Instead of relying on the header file, actually try to link
    using that symbol to determine if PIGLIT_HAS_GBM_BO_MAP
    should be defined.
    Signed-off-by: default avatarDaniel Díaz <daniel.diaz@linaro.org>
    Reviewed-by: Jan Vesely's avatarJan Vesely <jan.vesely@rutgers.edu>
    Reviewed-by: Dylan Baker's avatarDylan Baker <dylan@pnwbakers.com>
CMakeLists.txt 18.2 KB