diff options
author | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-08-28 23:30:27 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2021-08-28 23:30:27 +0200 |
commit | f3ac7d608633d0f2bad0505c1ed1c25af6048745 (patch) | |
tree | ac4eee29d8b74ef1fb3d1bf409ab858962bff2fe /tests/CMakeLists.txt | |
parent | 91282dafe2399a3da22f75f78690bc5bad563a76 (diff) | |
parent | 3859fae9f80ab2a85e1926c48627c90355a927d1 (diff) | |
download | libayatana-common-f3ac7d608633d0f2bad0505c1ed1c25af6048745.tar.gz libayatana-common-f3ac7d608633d0f2bad0505c1ed1c25af6048745.tar.bz2 libayatana-common-f3ac7d608633d0f2bad0505c1ed1c25af6048745.zip |
Merge branch 'sunweaver-pr/conditional-gir-and-vala'
Attributes GH PR #38: https://github.com/AyatanaIndicators/libayatana-common/pull/38
Diffstat (limited to 'tests/CMakeLists.txt')
-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 61ce542..6c01995 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -55,10 +55,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() |