forked from ElektraInitiative/libelektra
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
45 lines (41 loc) · 1.6 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
include (SafeCheckSymbolExists)
include (LibAddMacros)
set (plugin path)
if (DEPENDENCY_PHASE)
add_definitions (-D_GNU_SOURCE)
safe_check_symbol_exists (euidaccess "unistd.h" TEST_EUIDACCESS)
safe_check_symbol_exists (access "unistd.h" TEST_ACCESS)
safe_check_symbol_exists (geteuid "unistd.h" TEST_GETEUID)
safe_check_symbol_exists (getegid "unistd.h" TEST_GETEGID)
safe_check_symbol_exists (seteuid "unistd.h" TEST_SETEUID)
safe_check_symbol_exists (setegid "unistd.h" TEST_SETEGID)
safe_check_symbol_exists (getpwnam "pwd.h" TEST_GETPWNAM)
safe_check_symbol_exists (getpwuid "pwd.h" TEST_GETPWUID)
safe_check_symbol_exists (getgrouplist "grp.h" TEST_GETGROUPLIST)
safe_check_symbol_exists (getgrgid "grp.h" TEST_GETGRGID)
if (NOT TEST_EUIDACCESS)
remove_plugin (${plugin} "could not find euidaccess.")
elseif (NOT TEST_ACCESS)
remove_plugin (${plugin} "could not find access.")
elseif (NOT TEST_GETEUID)
remove_plugin (${plugin} "could not find geteuid.")
elseif (NOT TEST_GETEGID)
remove_plugin (${plugin} "could not find getegid.")
elseif (NOT TEST_SETEUID)
remove_plugin (${plugin} "could not find seteuid.")
elseif (NOT TEST_SETEGID)
remove_plugin (${plugin} "could not find setegid.")
elseif (NOT TEST_GETPWNAM)
remove_plugin (${plugin} "could not find getpwnam.")
elseif (NOT TEST_GETPWUID)
remove_plugin (${plugin} "could not find getpwuid.")
elseif (NOT TEST_GETGROUPLIST)
remove_plugin (${plugin} "could not find getgrouplist.")
elseif (NOT TEST_GETGRGID)
remove_plugin (${plugin} "could not find getgrgid.")
endif ()
endif ()
add_plugin (
path
SOURCES path.h path.c
TEST_README)