Skip to content

Commit

Permalink
checkin 1.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
gwanglst committed Jul 11, 2013
0 parents commit 1e6bc0f
Show file tree
Hide file tree
Showing 959 changed files with 168,384 additions and 0 deletions.
20 changes: 20 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
cmake_minimum_required(VERSION 2.8)

Project(openlitespeed)
INCLUDE( ${PROJECT_SOURCE_DIR}/CMakeModules/common.cmake)

SET(CMAKE_INCLUDE_CURRENT_DIR ON)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/src/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/src/config.h)

SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules)
find_package(ZLIB REQUIRED)
##find_package(LibLdap REQUIRED)
find_package(PCRE REQUIRED)
find_package(EXPAT REQUIRED)
find_package(OpenSSL REQUIRED)

add_subdirectory(src)




69 changes: 69 additions & 0 deletions CMakeModules/FindLibLdap.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Try and find libldap.
# As soon as libldap has been found, the following variables will be defined:
#
# LIBLDAP_FOUND
# LDAP_INCLUDE_DIR
# LDAP_LIBRARY:FILEPATH
#
#
# Copyright (c) 2009 Juergen Leising <[email protected]>
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#


MESSAGE(STATUS "checking for libldap and liblber...")

FIND_PATH(LDAP_INCLUDE_DIR NAMES ldap.h
PATHS /include /usr/include /usr/local/include /usr/share/include /opt/include
DOC "Try and find the header file ldap.h")

FIND_PATH(LBER_INCLUDE_DIR NAMES lber.h
PATHS /include /usr/include /usr/local/include /usr/share/include /opt/include ${LDAP_INCLUDE_DIR}
DOC "Try and find the header file lber.h")



FIND_LIBRARY(LDAP_LIBRARY NAMES ldap
PATHS /usr/lib /lib /usr/local/lib /usr/share/lib /opt/lib /opt/share/lib /var/lib /usr/lib64 /lib64 /usr/local/lib64 /usr/share/lib64 /opt/lib64 /opt/share/lib64 /var/lib64
DOC "Try and find libldap")


IF (LDAP_LIBRARY)
get_filename_component(LDAP_LIBRARY_DIRS ${LDAP_LIBRARY} PATH)
FIND_LIBRARY(LBER_LIBRARY NAMES lber
PATHS /usr/lib /lib /usr/local/lib /usr/share/lib /opt/lib /opt/share/lib /var/lib /usr/lib64 /lib64 /usr/local/lib64 /usr/share/lib64 /opt/lib64 /opt/share/lib64 /var/lib64 ${LDAP_LIBRARY_DIRS}
DOC "Try and find liblber")
ELSE (LDAP_LIBRARY)
FIND_LIBRARY(LBER_LIBRARY NAMES lber
PATHS /usr/lib /lib /usr/local/lib /usr/share/lib /opt/lib /opt/share/lib /var/lib /usr/lib64 /lib64 /usr/local/lib64 /usr/share/lib64 /opt/lib64 /opt/share/lib64 /var/lib64
DOC "Try and find liblber")
ENDIF (LDAP_LIBRARY)




IF (LBER_LIBRARY)
SET( LIBLBER_FOUND 1 )
get_filename_component(LBER_LIBRARY_DIRS ${LBER_LIBRARY} PATH)
MESSAGE(STATUS " Found ${LBER_LIBRARY}")
ELSE(LBER_LIBRARY)
MESSAGE( STATUS " Could NOT find liblber.")
ENDIF (LBER_LIBRARY)




IF (LDAP_INCLUDE_DIR AND LDAP_LIBRARY)
SET( LIBLDAP_FOUND 1 )
MESSAGE(STATUS " Found ${LDAP_LIBRARY}")
ELSE (LDAP_INCLUDE_DIR AND LDAP_LIBRARY)
IF ( LibLdap_FIND_REQUIRED )
MESSAGE( FATAL_ERROR " Could NOT find libldap. The ldap plugin needs this library.")
ELSE ( LibLdap_FIND_REQUIRED )
MESSAGE( STATUS " Could NOT find libldap.")
ENDIF ( LibLdap_FIND_REQUIRED )
ENDIF (LDAP_INCLUDE_DIR AND LDAP_LIBRARY)

44 changes: 44 additions & 0 deletions CMakeModules/FindPCRE.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# - Try to find the PCRE regular expression library
# Once done this will define
#
# PCRE_FOUND - system has the PCRE library
# PCRE_INCLUDE_DIR - the PCRE include directory
# PCRE_LIBRARIES - The libraries needed to use PCRE

# Copyright (c) 2006, Alexander Neundorf, <[email protected]>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.

if (PCRE_INCLUDE_DIR AND PCRE_PCREPOSIX_LIBRARY AND PCRE_PCRE_LIBRARY)
# Already in cache, be silent
set(PCRE_FIND_QUIETLY TRUE)
endif (PCRE_INCLUDE_DIR AND PCRE_PCREPOSIX_LIBRARY AND PCRE_PCRE_LIBRARY)

if (NOT WIN32)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
find_package(PkgConfig)
pkg_check_modules(PC_PCRE QUIET libpcre)
set(PCRE_DEFINITIONS ${PC_PCRE_CFLAGS_OTHER})
endif (NOT WIN32)

find_path(PCRE_INCLUDE_DIR pcre.h
HINTS ${PC_PCRE_INCLUDEDIR} ${PC_PCRE_INCLUDE_DIRS}
PATH_SUFFIXES pcre)

find_library(PCRE_PCRE_LIBRARY NAMES pcre HINTS ${PC_PCRE_LIBDIR} ${PC_PCRE_LIBRARY_DIRS})

find_library(PCRE_PCREPOSIX_LIBRARY NAMES pcreposix HINTS ${PC_PCRE_LIBDIR} ${PC_PCRE_LIBRARY_DIRS})

include(FindPackageHandleStandardArgs)

IF(NOT WIN32)
find_package_handle_standard_args(PCRE DEFAULT_MSG PCRE_INCLUDE_DIR PCRE_PCRE_LIBRARY PCRE_PCREPOSIX_LIBRARY )
mark_as_advanced(PCRE_INCLUDE_DIR PCRE_LIBRARIES PCRE_PCREPOSIX_LIBRARY PCRE_PCRE_LIBRARY)
set(PCRE_LIBRARIES ${PCRE_PCRE_LIBRARY} ${PCRE_PCREPOSIX_LIBRARY})
ELSE()
find_package_handle_standard_args(PCRE DEFAULT_MSG PCRE_INCLUDE_DIR PCRE_PCRE_LIBRARY )
set(PCRE_LIBRARIES ${PCRE_PCRE_LIBRARY} )
mark_as_advanced(PCRE_INCLUDE_DIR PCRE_LIBRARIES PCRE_PCRE_LIBRARY)
ENDIF()
3 changes: 3 additions & 0 deletions CMakeModules/common.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
cmake_minimum_required(VERSION 2.8)
include_directories ("${PROJECT_SOURCE_DIR}/src")

Loading

0 comments on commit 1e6bc0f

Please sign in to comment.