summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDavid Sommerseth <dazo@users.sourceforge.net>2008-12-11 11:56:01 +0100
committerDavid Sommerseth <dazo@users.sourceforge.net>2008-12-11 11:56:01 +0100
commit6e47264d50651f910788b63383b1b1546ab40aff (patch)
treeff85e2e8222a7edcb914c1cb4163818996f109b0 /CMakeLists.txt
parent94b035d4a269bf79374d8b43281cb516e5218a6c (diff)
downloadeurephia-6e47264d50651f910788b63383b1b1546ab40aff.tar.gz
eurephia-6e47264d50651f910788b63383b1b1546ab40aff.tar.xz
eurephia-6e47264d50651f910788b63383b1b1546ab40aff.zip
Made building of OpenVPN plug-in optional
For those environments where you just want to build the eurephiadm and/or database drivers. ./configure must now be called with -p or --plug-in to build the OpenVPN plug-in
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt23
1 files changed, 14 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 68b124c..ca155d2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,6 +5,7 @@ OPTION(DEBUG "Add more verbose debug information" OFF)
OPTION(SHOW_SECRETS "Show passwords as clear text in logs." OFF)
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)
SET(OPENVPN_SRC "" CACHE STRING "Path to OpenVPN source code")
SET(PREFIX "/etc/openvpn/eurephia" CACHE STRING "Install prefix for eurephia")
@@ -39,15 +40,19 @@ IF(DEBUG)
ENDIF(SHOW_SECRETS)
ENDIF(DEBUG)
-IF(NOT OPENVPN_SRC)
- message(FATAL_ERROR "Missing path to OpenVPN source - try running ./configure again")
-ENDIF(NOT OPENVPN_SRC)
-INCLUDE_DIRECTORIES(BEFORE ${OPENVPN_SRC} .)
+IF(PLUGIN)
+ IF(NOT OPENVPN_SRC)
+ message(FATAL_ERROR "Missing path to OpenVPN source - try running ./configure again")
+ ENDIF(NOT OPENVPN_SRC)
+ message(STATUS "Building eurephia plug-in for OpenVPN")
-SET(CHECK_INCL_FILE "${OPENVPN_SRC}/openvpn-plugin.h")
-IF(NOT EXISTS ${CHECK_INCL_FILE})
- message(FATAL_ERROR "Missing openvpn-plugin.h ... Is the OpenVPN source code really located here? ${OPENVPN_SRC}")
-ENDIF(NOT EXISTS ${CHECK_INCL_FILE})
+ SET(CHECK_INCL_FILE "${OPENVPN_SRC}/openvpn-plugin.h")
+ IF(NOT EXISTS ${CHECK_INCL_FILE})
+ message(FATAL_ERROR "Missing openvpn-plugin.h ... Is the OpenVPN source code really located here? ${OPENVPN_SRC}")
+ ENDIF(NOT EXISTS ${CHECK_INCL_FILE})
+ INCLUDE_DIRECTORIES(BEFORE ${OPENVPN_SRC} .)
+ SET(subdirs ${subdirs} plugin)
+ENDIF(PLUGIN)
INCLUDE(CheckIncludeFile)
CHECK_INCLUDE_FILE(dlfcn.h HAVE_DLFCN_H)
@@ -74,4 +79,4 @@ ENDIF(NOT HAVE_PTHREAD_MUTEX_LOCK OR NOT HAVE_PTHREAD_MUTEX_UNLOCK)
ADD_DEFINITIONS(-g -Wall)
-SUBDIRS(${subdirs} plugin)
+SUBDIRS(${subdirs})