Added cmake build files (thanks RCL)

This commit is contained in:
Mark Vejvoda
2010-06-05 17:34:55 +00:00
parent 4ec55dd434
commit 9c5d911edc
8 changed files with 365 additions and 11 deletions

View File

@@ -0,0 +1,27 @@
# - Find curl
# Find the native CURL headers and libraries.
#
# CURL_INCLUDE_DIRS - where to find curl/curl.h, etc.
# CURL_LIBRARIES - List of libraries when using curl.
# CURL_FOUND - True if curl found.
# Look for the header file.
FIND_PATH(CURL_INCLUDE_DIR NAMES curl/curl.h)
MARK_AS_ADVANCED(CURL_INCLUDE_DIR)
# Look for the library.
FIND_LIBRARY(CURL_LIBRARY NAMES curl curl-gnutls)
MARK_AS_ADVANCED(CURL_LIBRARY)
# handle the QUIETLY and REQUIRED arguments and set CURL_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(CURL DEFAULT_MSG CURL_LIBRARY CURL_INCLUDE_DIR)
IF(CURL_FOUND)
SET(CURL_LIBRARIES ${CURL_LIBRARY})
SET(CURL_INCLUDE_DIRS ${CURL_INCLUDE_DIR})
ELSE(CURL_FOUND)
SET(CURL_LIBRARIES)
SET(CURL_INCLUDE_DIRS)
ENDIF(CURL_FOUND)

View File

@@ -0,0 +1,45 @@
# Find the Lua 5.1 includes and library
#
# LUA_INCLUDE_DIR - where to find lua.h
# LUA_LIBRARIES - List of fully qualified libraries to link against
# LUA_FOUND - Set to TRUE if found
# Copyright (c) 2007, Pau Garcia i Quiles, <pgquiles@elpauer.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
# [RCL] FIXME: is it future proof with names like lua5.1? Kubuntu does not provide
# a generic (version-independent) include directory for LUA...
IF(LUA_INCLUDE_DIR AND LUA_LIBRARIES)
SET(LUA_FIND_QUIETLY TRUE)
ENDIF(LUA_INCLUDE_DIR AND LUA_LIBRARIES)
FIND_PATH(LUA_INCLUDE_DIR NAMES lua.hpp
PATHS /usr/include/lua
/usr/include/lua5.1
)
FIND_LIBRARY(LUA_LIBRARIES NAMES lua5.1 )
IF(LUA_INCLUDE_DIR AND LUA_LIBRARIES)
SET(LUA_FOUND TRUE)
INCLUDE(CheckLibraryExists)
CHECK_LIBRARY_EXISTS(${LUA_LIBRARIES} lua_close "" LUA_NEED_PREFIX)
ELSE(LUA_INCLUDE_DIR AND LUA_LIBRARIES)
SET(LUA_FOUND FALSE)
ENDIF (LUA_INCLUDE_DIR AND LUA_LIBRARIES)
IF(LUA_FOUND)
IF (NOT LUA_FIND_QUIETLY)
MESSAGE(STATUS "Found Lua library: ${LUA_LIBRARIES}")
MESSAGE(STATUS "Found Lua headers: ${LUA_INCLUDE_DIR}")
ENDIF (NOT LUA_FIND_QUIETLY)
ELSE(LUA_FOUND)
IF(LUA_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "Could NOT find Lua")
ENDIF(LUA_FIND_REQUIRED)
ENDIF(LUA_FOUND)
MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARIES)

View File

@@ -0,0 +1,38 @@
# Defines
# OGG_FOUND
# OGG_INCLUDE_DIR
# OGG_LIBRARY
# VORBIS_LIBRARY
# VORBIS_FILE_LIBRARY
#
# check for cache to avoid littering log
IF(OGG_INCLUDE_DIR AND OGG_LIBRARY AND VORBIS_LIBRARY)
SET(OGG_BE_QUIET TRUE)
ENDIF(OGG_INCLUDE_DIR AND OGG_LIBRARY AND VORBIS_LIBRARY)
FIND_PATH(OGG_INCLUDE_DIR ogg/ogg.h)
FIND_LIBRARY(OGG_LIBRARY NAMES ogg)
FIND_LIBRARY(VORBIS_LIBRARY NAMES vorbis)
FIND_LIBRARY(VORBIS_FILE_LIBRARY NAMES vorbisfile)
IF(OGG_INCLUDE_DIR AND OGG_LIBRARY AND VORBIS_LIBRARY AND VORBIS_FILE_LIBRARY)
SET(OGG_FOUND TRUE)
IF(NOT OGG_BE_QUIET)
MESSAGE(STATUS "OGG/Vorbis includes: ${OGG_INCLUDE_DIR}")
MESSAGE(STATUS "OGG library : ${OGG_LIBRARY}")
MESSAGE(STATUS "Vorbis library : ${VORBIS_LIBRARY}")
MESSAGE(STATUS "Vorbis file library: ${VORBIS_FILE_LIBRARY}")
ENDIF(NOT OGG_BE_QUIET)
ELSE(OGG_INCLUDE_DIR AND OGG_LIBRARY AND VORBIS_LIBRARY AND VORBIS_FILE_LIBRARY)
SET(OGG_FOUND FALSE)
MESSAGE("OGG/Vorbis was not found on this system!")
ENDIF(OGG_INCLUDE_DIR AND OGG_LIBRARY AND VORBIS_LIBRARY AND VORBIS_FILE_LIBRARY)
MARK_AS_ADVANCED(
OGG_INCLUDE_DIR
OGG_LIBRARY
VORBIS_LIBRARY
VORBIS_FILE_LIBRARY
)

View File

@@ -0,0 +1,30 @@
# - Find Xerces-C
# Find the Xerces-C includes and library
#
# XERCESC_INCLUDE_DIR - Where to find xercesc include sub-directory.
# XERCESC_LIBRARIES - List of libraries when using Xerces-C.
# XERCESC_FOUND - True if Xerces-C found.
IF (XERCESC_INCLUDE_DIR)
# Already in cache, be silent.
SET(XERCESC_FIND_QUIETLY TRUE)
ENDIF (XERCESC_INCLUDE_DIR)
FIND_PATH(XERCESC_INCLUDE_DIR xercesc/dom/DOM.hpp)
SET(XERCESC_NAMES xerces-c xerces-c_3 xerces-c_2)
FIND_LIBRARY(XERCESC_LIBRARY NAMES ${XERCESC_NAMES} )
# Handle the QUIETLY and REQUIRED arguments and set XERCESC_FOUND to
# TRUE if all listed variables are TRUE.
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(XercesC DEFAULT_MSG XERCESC_LIBRARY XERCESC_INCLUDE_DIR)
IF(XERCESC_FOUND)
SET( XERCESC_LIBRARIES ${XERCESC_LIBRARY} )
ELSE(XERCESC_FOUND)
SET( XERCESC_LIBRARIES )
ENDIF(XERCESC_FOUND)
MARK_AS_ADVANCED( XERCESC_LIBRARY XERCESC_INCLUDE_DIR )