You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.0 KiB

9 years ago
set(CNAME "openvpn-auth-ldap")
set(VERSION 0.01)
9 years ago
9 years ago
project(${CNAME} C)
cmake_minimum_required(VERSION 2.6)
9 years ago
9 years ago
include(CTest)
9 years ago
option(WITH_HARDENING "Enable hardening options" ON)
if (NOT DEFINED CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "/usr")
endif ()
9 years ago
set(INSTALL_LIB "${CMAKE_INSTALL_PREFIX}/lib/openvpn")
9 years ago
list(APPEND CMAKE_C_FLAGS "-Wall -Wextra -pedantic")
find_library(LIBLDAP NAMES "ldap")
if (WITH_HARDENING)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wformat -Wformat-security -Werror=format-security" )
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fstack-protector --param ssp-buffer-size=4" )
add_definitions("-D_FORTIFY_SOURCE=2")
endif ()
9 years ago
message(STATUS "------------------------------------------")
message(STATUS "Build type is: ${CMAKE_BUILD_TYPE}")
message(STATUS "")
message(STATUS "Install prefix: ${CMAKE_INSTALL_PREFIX}")
message(STATUS "Library directory: ${INSTALL_LIB}")
message(STATUS "")
message(STATUS "ldap: ${LIBLDAP}")
9 years ago
add_subdirectory (src)
9 years ago
add_subdirectory (tests)