Arquivos
client/cmake/Modules/FindLog4C.cmake
T
Andreas Schneider f33a01216a Fix FindLog4C.cmake.
2009-09-01 12:16:31 +02:00

58 linhas
1.3 KiB
CMake

# - Try to find Log4C
# Once done this will define
#
# LOG4C_FOUND - system has Log4C
# LOG4C_INCLUDE_DIRS - the Log4C include directory
# LOG4C_LIBRARIES - Link these to use Log4C
# LOG4C_DEFINITIONS - Compiler switches required for using Log4C
#
# Copyright (c) 2009 Andreas Schneider <mail@cynapses.org>
#
# Redistribution and use is allowed according to the terms of the New
# BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#
if (LOG4C_LIBRARIES AND LOG4C_INCLUDE_DIRS)
# in cache already
set(LOG4C_FOUND TRUE PARENT_SCOPE)
else (LOG4C_LIBRARIES AND LOG4C_INCLUDE_DIRS)
find_path(LOG4C_INCLUDE_DIR
NAMES
log4c.h
PATHS
/usr/include
/usr/local/include
/opt/local/include
/sw/include
)
find_library(LOG4C_LIBRARY
NAMES
log4c
PATHS
/usr/lib
/usr/local/lib
/opt/local/lib
/sw/lib
)
set(LOG4C_INCLUDE_DIRS
${LOG4C_INCLUDE_DIR}
)
set(LOG4C_LIBRARIES
${LOG4C_LIBRARY}
)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(Log4C DEFAULT_MSG LOG4C_LIBRARIES LOG4C_INCLUDE_DIRS)
# show the LOG4C_INCLUDE_DIRS and LOG4C_LIBRARIES variables only in the advanced view
mark_as_advanced(LOG4C_INCLUDE_DIRS LOG4C_LIBRARIES)
endif (LOG4C_LIBRARIES AND LOG4C_INCLUDE_DIRS)