diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b301da77d..ca473c1998 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -783,11 +783,13 @@ 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}) +if (WITH_GNUCASH) string(REGEX MATCH "^([0-9]+)\.([0-9]+)" GTK_MIN_MATCH ${GTK_MIN_VERSION}) set(GTK_API ${CMAKE_MATCH_1}_${CMAKE_MATCH_2}) 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}) +endif() add_definitions (-DHAVE_CONFIG_H)