From 3859fae9f80ab2a85e1926c48627c90355a927d1 Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Sat, 28 Aug 2021 16:15:23 +0200 Subject: GIR and Vala bindings: Properly detect GObjectIntrospection and Vala and disable GIR and Vala if not found. --- CMakeLists.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index 751bf36..4dfc038 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -51,6 +51,10 @@ pkg_check_modules( ) include_directories(${URLDISPATCHER_INCLUDE_DIRS}) +# for GIR and Vala bindings +find_package (GObjectIntrospection QUIET) +find_package (Vala QUIET) + set(CC_WARNING_ARGS " -Wall -pedantic -Wextra -Wno-missing-field-initializers") add_subdirectory(src) @@ -76,3 +80,14 @@ endif() message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}") message(STATUS "Unit tests: ${ENABLE_TESTS}") message(STATUS "Build with -Werror: ${ENABLE_WERROR}") + +if (INTROSPECTION_FOUND) + message(STATUS "Build GObjectIntrospection: YES") + if (VALA_COMPILER) + message(STATUS "Build Vala bindings: YES") + else() + message(STATUS "Build Vala bindings: NO") + endif() +else() + message(STATUS "Build GObjectIntrospection: NO") +endif() \ No newline at end of file -- cgit v1.2.3