diff options
author | Marvin W <git@larma.de> | 2022-11-03 09:46:07 -0600 |
---|---|---|
committer | fiaxh <git@lightrise.org> | 2022-11-03 14:10:57 -0600 |
commit | 6e37f3fe3fa0f4ce9a25a91e9d97191c8e4abec1 (patch) | |
tree | 82ab76feb349dceccdfe3e362f211ca3cff7c10e /plugins/http-files/CMakeLists.txt | |
parent | 809c1579e41000f2f43eeb05735afc8165a1a430 (diff) | |
download | dino-6e37f3fe3fa0f4ce9a25a91e9d97191c8e4abec1.tar.gz dino-6e37f3fe3fa0f4ce9a25a91e9d97191c8e4abec1.zip |
Automatically select appropriate libsoup version
Diffstat (limited to 'plugins/http-files/CMakeLists.txt')
-rw-r--r-- | plugins/http-files/CMakeLists.txt | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/plugins/http-files/CMakeLists.txt b/plugins/http-files/CMakeLists.txt index b29cfda3..f9d1213b 100644 --- a/plugins/http-files/CMakeLists.txt +++ b/plugins/http-files/CMakeLists.txt @@ -1,11 +1,4 @@ -set(HTTP_FILES_DEFINITIONS) -if(USE_SOUP3) - set(Soup Soup3) - set(HTTP_FILES_DEFINITIONS ${HTTP_FILES_DEFINITIONS} SOUP_3) -else() - set(Soup Soup2) -endif() - +include(SoupVersion) find_packages(HTTP_FILES_PACKAGES REQUIRED Gee GLib @@ -15,6 +8,12 @@ find_packages(HTTP_FILES_PACKAGES REQUIRED ${Soup} ) +set(HTTP_FILES_DEFINITIONS) + +if(${Soup}_VERSION VERSION_GREATER_EQUAL "3.0") + set(HTTP_FILES_DEFINITIONS ${HTTP_FILES_DEFINITIONS} SOUP_3_0) +endif() + vala_precompile(HTTP_FILES_VALA_C SOURCES src/file_provider.vala |