Skip to content

Commit a6d570a

Browse files
authored
cmakelists: fix libpam finding for base ubuntu (#1027)
1 parent ab83d0d commit a6d570a

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,16 @@ find_library(PAM_FOUND NAMES pam libpam)
9393
if(PAM_FOUND)
9494
set(PAM_LIB ${PAM_FOUND})
9595
else()
96-
pkg_check_modules(PAM IMPORTED_TARGET pam libpam)
96+
pkg_check_modules(PAM IMPORTED_TARGET libpam)
9797
if(PAM_FOUND)
9898
set(PAM_LIB PkgConfig::PAM)
9999
else()
100-
message(FATAL_ERROR "The required library libpam was not found.")
100+
pkg_check_modules(PAM IMPORTED_TARGET pam)
101+
if(PAM_FOUND)
102+
set(PAM_LIB PkgConfig::PAM)
103+
else()
104+
message(FATAL_ERROR "The required library libpam was not found.")
105+
endif()
101106
endif()
102107
endif()
103108

0 commit comments

Comments
 (0)