diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-08-28 16:15:23 +0200 |
---|---|---|
committer | Robert Tari <robert@tari.in> | 2021-09-02 13:21:07 +0200 |
commit | 7cb304774fdeef0b2a674aaa54d394872512335a (patch) | |
tree | 681714b76525162633e4ac9c4bdf30c840737cf7 /tests | |
parent | 890f7117640c9557dc2ff011e6d2498b95e1e665 (diff) | |
download | libayatana-common-7cb304774fdeef0b2a674aaa54d394872512335a.tar.gz libayatana-common-7cb304774fdeef0b2a674aaa54d394872512335a.tar.bz2 libayatana-common-7cb304774fdeef0b2a674aaa54d394872512335a.zip |
GIR and Vala bindings: Properly detect GObjectIntrospection and Vala and disable GIR and Vala if not found.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ecb3c12..002e4db 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -56,10 +56,13 @@ add_custom_command( # tst_utils_vala -add_executable("tst_utils_vala" "${CMAKE_CURRENT_BINARY_DIR}/tst_utils.c") -target_include_directories("tst_utils_vala" PUBLIC "${GLIB_INCLUDE_DIRS};${CMAKE_BINARY_DIR}/src") -target_link_libraries("tst_utils_vala" "${GLIB_LIBRARIES} -layatana-common -L${CMAKE_BINARY_DIR}/src") -target_link_directories("tst_utils_vala" PUBLIC "${CMAKE_BINARY_DIR}/src") -add_dependencies("tst_utils_vala" "src") +if (VALA_COMPILER) -add_test(NAME "TstUtilsVala" COMMAND "${CMAKE_CURRENT_BINARY_DIR}/tst_utils_vala" "${CMAKE_CURRENT_BINARY_DIR}") + add_executable("tst_utils_vala" "${CMAKE_CURRENT_BINARY_DIR}/tst_utils.c") + target_include_directories("tst_utils_vala" PUBLIC "${GLIB_INCLUDE_DIRS};${CMAKE_BINARY_DIR}/src") + target_link_libraries("tst_utils_vala" "${GLIB_LIBRARIES} -layatana-common -L${CMAKE_BINARY_DIR}/src") + target_link_directories("tst_utils_vala" PUBLIC "${CMAKE_BINARY_DIR}/src") + add_dependencies("tst_utils_vala" "src") + + add_test(NAME "TstUtilsVala" COMMAND "${CMAKE_CURRENT_BINARY_DIR}/tst_utils_vala" "${CMAKE_CURRENT_BINARY_DIR}") +endif() |