aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorFlorian Märkl <info@florianmaerkl.de>2025-05-09 18:24:14 +0200
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2026-06-09 15:40:23 +0200
commit80c8c7c5d9872727dbaa4c987f520240555eb4ba (patch)
tree02884795544f11ff121bdd9c1b48ccedd4c6e30d /tests
parent6be6bfff40db6450d11a151812c8b27a65cbe1ed (diff)
downloadlibayatana-indicator-80c8c7c5d9872727dbaa4c987f520240555eb4ba.tar.gz
libayatana-indicator-80c8c7c5d9872727dbaa4c987f520240555eb4ba.tar.bz2
libayatana-indicator-80c8c7c5d9872727dbaa4c987f520240555eb4ba.zip
Fix linking against libs in non-standard paths
pkg_check_modules does not include absolute paths to the libraries in <prefix>_LIBRARIES, causing linker errors if they are not located in a standard path. <prefix>_LINK_LIBRARIES is the equivalent that does contain absolute paths.
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 3f0ef94..b2a3ab4 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -13,7 +13,7 @@ function(add_test_library_by_name name)
add_library("${TEST_LIBRARY_NAME}" SHARED ${TEST_LIBRARY_NAME}.c)
target_include_directories("${TEST_LIBRARY_NAME}" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
target_include_directories("${TEST_LIBRARY_NAME}" PUBLIC "${CMAKE_SOURCE_DIR}/src")
- target_link_libraries("${TEST_LIBRARY_NAME}" ${PROJECT_DEPS_LIBRARIES} -l${ayatana_indicator_gtkver})
+ target_link_libraries("${TEST_LIBRARY_NAME}" ${PROJECT_DEPS_LINK_LIBRARIES} -l${ayatana_indicator_gtkver})
target_link_directories("${TEST_LIBRARY_NAME}" PUBLIC "${CMAKE_BINARY_DIR}/src")
add_dependencies("${TEST_LIBRARY_NAME}" "${ayatana_indicator_gtkver}")
endfunction()
@@ -25,7 +25,7 @@ function(add_test_executable_by_name name)
target_compile_definitions("${TEST_EXECUTABLE_NAME}" PUBLIC SRCDIR="${CMAKE_CURRENT_SOURCE_DIR}")
target_include_directories("${TEST_EXECUTABLE_NAME}" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
target_include_directories("${TEST_EXECUTABLE_NAME}" PUBLIC "${CMAKE_SOURCE_DIR}/src")
- target_link_libraries("${TEST_EXECUTABLE_NAME}" ${PROJECT_DEPS_LIBRARIES} -l${ayatana_indicator_gtkver})
+ target_link_libraries("${TEST_EXECUTABLE_NAME}" ${PROJECT_DEPS_LINK_LIBRARIES} -l${ayatana_indicator_gtkver})
target_link_directories("${TEST_EXECUTABLE_NAME}" PUBLIC "${CMAKE_BINARY_DIR}/src")
add_dependencies("${TEST_EXECUTABLE_NAME}" "${ayatana_indicator_gtkver}")
endfunction()
@@ -277,7 +277,7 @@ add_test("loader-tester" "loader-tester")
# indicator-test-service
add_executable("indicator-test-service" indicator-test-service.c)
target_include_directories("indicator-test-service" PUBLIC ${PROJECT_DEPS_INCLUDE_DIRS})
-target_link_libraries("indicator-test-service" ${PROJECT_DEPS_LIBRARIES})
+target_link_libraries("indicator-test-service" ${PROJECT_DEPS_LINK_LIBRARIES})
set (ALL_TESTERS
"service-manager-connect-tester"