Description: Debian-specific changes to the cmake build system
Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
Forwarded: not-needed
Last-Update: 2019-02-24

--- a/ftpd/CMakeLists.txt
+++ b/ftpd/CMakeLists.txt
@@ -1,4 +1,6 @@
 
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DHASSETPROCTITLE -DUSE_SSL")
+
 include_directories(
     BEFORE
     "../support/"
@@ -18,6 +20,9 @@
     in.ftpd
     ${USE_CRYPT}
     support
+    ssl
+    crypto
+    ${USE_PAM}
 )
 install(
     TARGETS in.ftpd
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,6 +5,14 @@
 set(MAN_DIR "${CMAKE_INSTALL_PREFIX}/share/man")
 
 find_library(USE_CRYPT crypt REQUIRED)
+find_library(USE_PAM pam)
+
+if(USE_PAM)
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_PAM=1")
+    #set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lpam")
+endif()
+
+set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_FILE_OFFSET_BITS=64")
 
 add_subdirectory(ftpd)
 add_subdirectory(support)
