cmake: Correct gbm version check

It appears like gbm_VERSION can be a list, which if() does not like. So
pass the variable to the if() rather than its value. While on this, also
change GREATER_EQUAL to VERSION_GREATER_EQUAL so cmake compares
individual version components.
master
Vlad Zahorodnii 1 year ago
parent 1e848ac302
commit 70d76791d8

@ -236,12 +236,12 @@ set_package_properties(Libdrm PROPERTIES TYPE REQUIRED PURPOSE "Required for drm
find_package(gbm)
set_package_properties(gbm PROPERTIES TYPE REQUIRED PURPOSE "Required for egl output of drm backend.")
if (${gbm_VERSION} GREATER_EQUAL 21.1)
if (gbm_VERSION VERSION_GREATER_EQUAL 21.1)
set(HAVE_GBM_BO_GET_FD_FOR_PLANE 1)
else()
set(HAVE_GBM_BO_GET_FD_FOR_PLANE 0)
endif()
if (${gbm_VERSION} GREATER_EQUAL 21.3)
if (gbm_VERSION VERSION_GREATER_EQUAL 21.3)
set(HAVE_GBM_BO_CREATE_WITH_MODIFIERS2 1)
else()
set(HAVE_GBM_BO_CREATE_WITH_MODIFIERS2 0)

Loading…
Cancel
Save