Fix cmake 3.10 build

This commit is contained in:
Richard Cohen 2023-03-30 14:06:06 +01:00
parent a587dfff2c
commit a9a0c2104a

View File

@ -773,15 +773,15 @@ endif()
string(REGEX MATCH "^([0-9]+)\.([0-9]+)" GLIB_MIN_MATCH ${GLIB_MIN_VERSION})
set(GLIB_API ${CMAKE_MATCH_1}_${CMAKE_MATCH_2})
target_compile_definitions(PkgConfig::GLIB2 INTERFACE
set_property(TARGET PkgConfig::GLIB2 PROPERTY INTERFACE_COMPILE_DEFINITIONS
GLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_${GLIB_API}
GLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_${GLIB_API})
string(REGEX MATCH "^([0-9]+)\.([0-9]+)" GTK_MIN_MATCH ${GTK_MIN_VERSION})
set(GTK_API ${CMAKE_MATCH_1}_${CMAKE_MATCH_2})
target_compile_definitions(PkgConfig::GTK3 INTERFACE
GDK_VERSION_MIN_REQUIRED=GDK_VERSION_${GTK_API}
GDK_VERSION_MAX_ALLOWED=GDK_VERSION_${GTK_API})
set_property(TARGET PkgConfig::GTK3 PROPERTY INTERFACE_COMPILE_DEFINITIONS
GDK_VERSION_MIN_REQUIRED=GDK_VERSION_${GTK_API}
GDK_VERSION_MAX_ALLOWED=GDK_VERSION_${GTK_API})
add_definitions (-DHAVE_CONFIG_H)