diff options
author | Marvin W <git@larma.de> | 2022-03-16 08:33:13 -0600 |
---|---|---|
committer | Marvin W <git@larma.de> | 2022-03-16 08:41:51 -0600 |
commit | f0ed11ec49b6c5b3a52bc666e31ff9791dee77cf (patch) | |
tree | a77da9b3eae1784a19ef7554ba4fe58635f47f25 /CMakeLists.txt | |
parent | ee4fbf160d9abca47faa7eb1cc4d12b8199f4194 (diff) | |
download | dino-f0ed11ec49b6c5b3a52bc666e31ff9791dee77cf.tar.gz dino-f0ed11ec49b6c5b3a52bc666e31ff9791dee77cf.zip |
Fix build on Vala < 0.50 and pre-release Vala versions
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c9525870..b5734c45 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -199,7 +199,10 @@ include(MultiFind) include(GlibCompileResourcesSupport) find_package(GLib ${GLib_GLOBAL_VERSION} REQUIRED) -set(CMAKE_VALA_FLAGS "${CMAKE_VALA_FLAGS} --target-glib=${GLib_VERSION}") +string(REGEX REPLACE "^([0-9]+)\\.[0-9]+(\\.[0-9]+)?" "\\1" GLib_MAJOR_VERSION "${GLib_VERSION}") +string(REGEX REPLACE "^[0-9]+\\.([0-9]+)(\\.[0-9]+)?" "\\1" GLib_MINOR_VERSION "${GLib_VERSION}") +math(EXPR GLib_LAST_RELEASE_MINOR_VERSION "${GLib_MINOR_VERSION} / 2 * 2") +set(CMAKE_VALA_FLAGS "${CMAKE_VALA_FLAGS} --target-glib=${GLib_MAJOR_VERSION}.${GLib_LAST_RELEASE_MINOR_VERSION}") add_subdirectory(qlite) add_subdirectory(xmpp-vala) |