summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt14
-rwxr-xr-xconfigure26
-rw-r--r--doxygen/CMakeLists.txt30
3 files changed, 62 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 00b0ea8..2f22271 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,6 +30,7 @@ OPTION(SQLITE3 "Build database driver for SQLite3" OFF)
OPTION(EUREPHIADM "Build command line based admin utility" OFF)
OPTION(PLUGIN "Build the eurephia plugin for OpenVPN" OFF)
OPTION(GCOV "Build eurephia with gcov features enabled" OFF)
+OPTION(DOXYGEN "Compile Doxygen documentation" OFF)
# eurephia parameters - string values
SET(OPENVPN_SRC "" CACHE STRING "Path to OpenVPN source code")
@@ -65,9 +66,9 @@ IF(SQLITE3)
ENDIF(SQLITE3)
# Make sure we build at least one database driver
-IF(NOT DATABASE)
+IF(NOT DATABASE AND (EUREPHIADM OR PLUGIN))
message(FATAL_ERROR "Cannot build eurephia without any database drivers.")
-ENDIF(NOT DATABASE)
+ENDIF(NOT DATABASE AND (EUREPHIADM OR PLUGIN))
# eurephiadm - console based admin utility
@@ -163,7 +164,14 @@ ADD_LIBRARY(common STATIC IMPORTED)
SET_PROPERTY(TARGET common PROPERTY IMPORTED_LOCATION ${CMAKE_SOURCE_DIR}/common/libeurephiacommon.a)
# Start the building. First build the common library, and then the requested eurephia modules
-SUBDIRS(common ${subdirs})
+IF(DATABASE OR PLUGIN OR FIREWALL OR EUREPHIADM)
+ SUBDIRS(common ${subdirs})
+ENDIF(DATABASE OR PLUGIN OR FIREWALL OR EUREPHIADM)
+
+# Compile Doxygen docs at the end if requested
+IF(DOXYGEN)
+ SUBDIRS(doxygen)
+ENDIF(DOXYGEN)
# Give warning if DEBUG is enabled
IF(DEBUG)
diff --git a/configure b/configure
index 4b5ca11..ed1f5de 100755
--- a/configure
+++ b/configure
@@ -73,6 +73,9 @@ configure help for eurephia
firewall interface being built
--eurephiadm-xslt -- eurephiadm XSLT root path
(default: ${EUREPHIADM_XSLT})
+ ** Documentation
+ --doxygen -- Compile Doxygen developer documentation
+
EOF
}
@@ -182,6 +185,10 @@ while [ ! -z "$1" ]; do
EUREPHIADM_XSLT_SET=1
shift
;;
+ --doxygen)
+ PARAMS="${PARAMS} -DDOXYGEN=ON"
+ DOXY_DISTCLEAN="rm -r doxygen/eurephia-devel"
+ ;;
*)
echo "Unkown option: $1"
exit 2
@@ -204,8 +211,10 @@ fi
# Make sure at least one database driver is enabled.
if [ -z "${DB}" ]; then
- echo "You need to activate at least one database driver"
- exit 1;
+ if [ -n "${PLUGIN}" -o -n "${ADMIN}" ]; then
+ echo "You need to activate at least one database driver when OpenVPN plug-in or eurephiadm is enabled"
+ exit 1;
+ fi
fi
# Set default parameters for the SQLite3 database
@@ -235,7 +244,9 @@ EOF
echo
echo "eurephia will be built with support for: "
echo
- echo " Database: ${DB}"
+ if [ -n "${DB}" ]; then
+ echo " Database: ${DB}"
+ fi
echo " Firewall: ${FW:-"None"}"
echo " OpenVPN plug-in: ${PLUGIN:-"No plug-ins requested"}"
echo " Admin tools: ${ADMIN:-"None"}"
@@ -247,13 +258,17 @@ EOF
echo " XSLT base path: ${XSLTPATH}"
echo " eurephiadm XSLT path: ${EUREPHIADM_XSLT}"
fi
- if [ ${DB} = "SQLite3" ]; then
+ if [ "${DB}" = "SQLite3" ]; then
echo " SQLite3 database path: ${SQLITE3PREFIX}"
fi
if [ "$GCOV" = "1" ]; then
echo
- echo "eurephia will be built with gcov. This may have a performance impact"
+ echo " eurephia will be built with gcov. This may have a performance impact"
+ fi
+ if [ -n "${DOXY_DISTCLEAN}" ]; then
+ echo
+ echo " eurephia developers documentation will be compiled under ./doxygen/eurephia-devel/"
fi
echo
echo
@@ -279,6 +294,7 @@ distclean : clean
find -type f -name Makefile | xargs rm -rf
find -type f -name "*~" | xargs rm -f
rm -f CMakeCache.txt
+ ${DOXY_DISTCLEAN}
uninstall :
@echo "Uninstalling eurephia: "
diff --git a/doxygen/CMakeLists.txt b/doxygen/CMakeLists.txt
new file mode 100644
index 0000000..4d79097
--- /dev/null
+++ b/doxygen/CMakeLists.txt
@@ -0,0 +1,30 @@
+# cmake rules for eurephia - doxygen documentation
+#
+# GPLv2 only - Copyright (C) 2009
+# David Sommerseth <dazo@users.sourceforge.net>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; version 2
+# of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+PROJECT(eurephia-devel-docs C)
+cmake_minimum_required(VERSION 2.6)
+
+IF(DOXYGEN)
+ FIND_PACKAGE(Doxygen)
+ IF(NOT DOXYGEN_FOUND)
+ MESSAGE(FATAL_ERROR "Could not find doxygen")
+ ENDIF(NOT DOXYGEN_FOUND)
+ ADD_CUSTOM_TARGET(devel-docs ALL ${DOXYGEN_EXECUTABLE} Doxygen.conf)
+ SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES doxygen.log)
+ENDIF(DOXYGEN)