forked from ElektraInitiative/libelektra
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
23 lines (20 loc) · 840 Bytes
/
CMakeLists.txt
File metadata and controls
23 lines (20 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
include (CheckSymbolExists)
check_symbol_exists (__GNU_LIBRARY__ "features.h" HAVE_GLIBC)
if (NOT BUILD_SHARED)
exclude_binding (intercept_fs "intercept_fs only works with BUILD_SHARED")
elseif (NOT HAVE_GLIBC)
exclude_binding (intercept_fs "intercept_fs currently needs glibc")
else ()
add_binding (intercept_fs)
include (LibAddMacros)
add_headers (HDR_FILES)
set_source_files_properties (intercept.c PROPERTIES COMPILE_FLAGS "-Wno-unused-result")
add_library (elektraintercept-fs SHARED "intercept.c")
target_link_libraries (elektraintercept-fs elektra-kdb elektra-meta)
install (
TARGETS elektraintercept-fs
DESTINATION lib${LIB_SUFFIX}
COMPONENT libelektra${SO_VERSION})
mkdir (${CMAKE_LIBRARY_OUTPUT_DIRECTORY})
create_lib_symlink (libelektraintercept-fs.so libelektraintercept.so libelektra${SO_VERSION})
endif ()