set ( THREADS_PREFER_PTHREAD_FLAG ON )
find_package ( Threads REQUIRED )
+file ( READ sgauth.css CSS_DATA )
+configure_file ( css.h.in css.h ESCAPE_QUOTES @ONLY )
+
+set ( CMAKE_INCLUDE_CURRENT_DIR ON )
+
add_executable ( sgauth ${CPP_FILES} )
target_link_libraries ( sgauth conffiles ia crypto common Threads::Threads )
+++ /dev/null
-#!/bin/sh
-
-OUT_FILE=css.h
-
-
-echo "const char * css =" > $OUT_FILE
-echo "\"/*------*/\\\\n\"" >> $OUT_FILE
-sed -e 's/$/\\n"/g' -e 's/^/"/g' sgauth.css >> $OUT_FILE
-echo ";" >> $OUT_FILE
-
const char * replyFooter= "\n\n";
send(outerSocket, replyHeader, strlen(replyHeader), 0);
-send(outerSocket, css, strlen(css), 0);
+send(outerSocket, SGAuth::css, strlen(SGAuth::css), 0);
send(outerSocket, replyFooter, strlen(replyFooter), 0);
return 0;