summaryrefslogtreecommitdiff
path: root/accel-pppd/triton/CMakeLists.txt
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2011-01-05 15:18:59 +0300
committerDmitry Kozlov <xeb@mail.ru>2011-01-05 15:18:59 +0300
commitf28cb1b0a926f1ea98700b7871537ad1793511fd (patch)
treebaf35570bc6b38b6fab5b6524e8f19f58f71e57f /accel-pppd/triton/CMakeLists.txt
parent2fdf3586c13a72c36f9530084962e29d57dc0329 (diff)
downloadaccel-ppp-f28cb1b0a926f1ea98700b7871537ad1793511fd.tar.gz
accel-ppp-f28cb1b0a926f1ea98700b7871537ad1793511fd.zip
rename accel-pptp to accel-ppp
Diffstat (limited to 'accel-pppd/triton/CMakeLists.txt')
-rw-r--r--accel-pppd/triton/CMakeLists.txt40
1 files changed, 40 insertions, 0 deletions
diff --git a/accel-pppd/triton/CMakeLists.txt b/accel-pppd/triton/CMakeLists.txt
new file mode 100644
index 0000000..105b62a
--- /dev/null
+++ b/accel-pppd/triton/CMakeLists.txt
@@ -0,0 +1,40 @@
+SET(sources_c
+ md.c
+ timer.c
+ triton.c
+ conf_file.c
+ loader.c
+ log.c
+ mempool.c
+ event.c
+)
+
+INCLUDE(CheckFunctionExists)
+CHECK_FUNCTION_EXISTS(timerfd_create HAVE_TIMERFD)
+
+IF (HAVE_TIMERFD)
+ ADD_DEFINITIONS(-DHAVE_TIMERFD)
+ELSE (HAVE_TIMERFD)
+ INCLUDE (CheckCSourceCompiles)
+ CHECK_C_SOURCE_COMPILES("
+ #include <sys/syscall.h>
+ int main()
+ {
+ syscall(SYS_timerfd_create);
+ }" HAVE_SYSCALL)
+ IF (NOT HAVE_SYSCALL)
+ MESSAGE(FATAL_ERROR "Your system is too old and is not supported by accel-ppp, sorry...")
+ ENDIF (NOT HAVE_SYSCALL)
+ SET(sources_c ${sources_c} timerfd.c)
+ENDIF (HAVE_TIMERFD)
+
+INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
+
+ADD_DEFINITIONS(-DMODULE_PATH="${CMAKE_INSTALL_PREFIX}/lib/accel-ppp")
+
+ADD_LIBRARY(triton SHARED ${sources_c})
+TARGET_LINK_LIBRARIES(triton dl)
+
+INSTALL(TARGETS triton
+ LIBRARY DESTINATION lib/accel-ppp
+)