From 1f50231323e9dd198cf7c120563897f42b8cae1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Kundr=C3=A1t?= Date: Tue, 26 Jul 2022 11:41:14 +0200 Subject: [PATCH] tests: do not make assumptions about build directory layout The tests would only work if the build directory was named `build/`, and if it was a subdirectory of the source tree. Bug: #389 Fixes: 41a11e4 pam UPDATE auth using Linux PAM --- tests/CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 28c5f21c..64a04965 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -93,9 +93,9 @@ if(LIBPAM_HAVE_CONFDIR) #generate PAM configuration file file(WRITE ${CMAKE_SOURCE_DIR}/tests/pam/netconf.conf "#%PAM-1.4\n" - "auth required ${CMAKE_SOURCE_DIR}/build/tests/pam_netconf.so\n" - "account required ${CMAKE_SOURCE_DIR}/build/tests/pam_netconf.so\n" - "password required ${CMAKE_SOURCE_DIR}/build/tests/pam_netconf.so\n" + "auth required ${CMAKE_CURRENT_BINARY_DIR}/pam_netconf.so\n" + "account required ${CMAKE_CURRENT_BINARY_DIR}/pam_netconf.so\n" + "password required ${CMAKE_CURRENT_BINARY_DIR}/pam_netconf.so\n" ) endif()