diff options
author | Tom Rondeau <trondeau@vt.edu> | 2012-06-07 09:36:26 -0400 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2012-06-07 12:44:52 -0400 |
commit | 7cfe8af854348924d31aa1feb5978da6dd1fe1c4 (patch) | |
tree | 97191856f13febd0b31df5fa8808018537ce854b /cmake | |
parent | b40ccb1d3f12a6837df235ccbceee5180c711efa (diff) |
core: Adds a gr-log concept for easy logging at various levels.
Uses log4cxx and is optional. Macro based and macros are simple pass-throughs
if this dependency does not exist or if the gr-log is disabled.
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Modules/FindLog4cxx.cmake | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/cmake/Modules/FindLog4cxx.cmake b/cmake/Modules/FindLog4cxx.cmake new file mode 100644 index 0000000000..c1cc6571ef --- /dev/null +++ b/cmake/Modules/FindLog4cxx.cmake @@ -0,0 +1,28 @@ +# CMake module to find LOG4CXX library + +INCLUDE(FindPkgConfig) +PKG_CHECK_MODULES(PC_LOG4CXX log4cxx) + +FIND_PATH( + LOG4CXX_INCLUDE_DIRS + NAMES log4cxx/log4cxx.h + HINTS $ENV{LOG4CXX_DIR}/include + ${PC_LOG4CXX_INCLUDE_DIRS} + PATHS /usr/local/include + /usr/include +) + +FIND_LIBRARY( + LOG4CXX_LIBRARIES + NAMES log4cxx + HINTS $ENV{LOG4CXX_DIR}/lib + ${PC_LOG4CXX_LIBRARIES} + PATHS /usr/local/lib + /usr/local/lib64 + /usr/lib + /usr/lib64 +) + +INCLUDE(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LOG4CXX DEFAULT_MSG LOG4CXX_LIBRARIES LOG4CXX_INCLUDE_DIRS) +MARK_AS_ADVANCED(LOG4CXX_LIBRARIES LOG4CXX_INCLUDE_DIRS) |