]> the.earth.li Git - onak.git/blobdiff - CMakeLists.txt
Move the CGI specific routines into cgi/ and split out UID escaping
[onak.git] / CMakeLists.txt
index f755cf4e6348195ee88af1278c2feea46f5cdc25..acacb34a2a510aa58f5d98d92073419b2a7764ed 100644 (file)
@@ -23,6 +23,21 @@ option(KEYD
 set(CMAKE_POSITION_INDEPENDENT_CODE ON)
 TEST_BIG_ENDIAN(WORDS_BIGENDIAN)
 
+include(CheckCSourceCompiles)
+check_c_source_compiles(
+       "
+               #include <stdlib.h>
+               static void f(__attribute__((unused))) {}
+               int main(void) { f(); return 0;}
+       "
+       HAVE___ATTRIBUTE__UNUSED
+)
+if (HAVE___ATTRIBUTE__UNUSED)
+       set(UNUSED_ATTRIB "__attribute__((unused))")
+else()
+       set(UNUSED_ATTRIB "")
+endif()
+
 # Pick up a git based version number for development builds
 find_package(Git)
 if (GIT_FOUND AND EXISTS "${CMAKE_SOURCE_DIR}/.git")
@@ -36,7 +51,7 @@ endif()
 
 # Core objects
 add_library(libonak STATIC armor.c charfuncs.c cleankey.c cleanup.c decodekey.c
-       getcgi.c hash.c hash-helper.c key-store.c keyarray.c keyid.c keyindex.c
+       hash.c hash-helper.c key-store.c keyarray.c keyid.c keyindex.c
        ll.c log.c marshal.c mem.c merge.c onak-conf.c parsekey.c photoid.c
        rsa.c sigcheck.c sendsync.c sha1x.c wordlist.c)
 set(LIBONAK_LIBRARIES "")