diff options
author | Tom Rondeau <trondeau@vt.edu> | 2012-06-08 12:15:42 -0400 |
---|---|---|
committer | Tom Rondeau <trondeau@vt.edu> | 2012-06-08 12:15:42 -0400 |
commit | d71d02d7eb01b56b842d6a71a2b7d087c5513e7b (patch) | |
tree | 27dd93e12a85fac6dc7bd2bfb3d22b94d073918c /gnuradio-core/src/lib/swig | |
parent | a14010ec147e3c86f93245d34be58548493aaed1 (diff) |
Fixing up the gr-log capabilities.
Better handling of enable/disable function, easier integration with all components if log4cxx is or is not there. All components have been updated to be able to use logging. Docs update, too.
Diffstat (limited to 'gnuradio-core/src/lib/swig')
-rw-r--r-- | gnuradio-core/src/lib/swig/CMakeLists.txt | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/gnuradio-core/src/lib/swig/CMakeLists.txt b/gnuradio-core/src/lib/swig/CMakeLists.txt index 3bef440f66..f7af17b2d6 100644 --- a/gnuradio-core/src/lib/swig/CMakeLists.txt +++ b/gnuradio-core/src/lib/swig/CMakeLists.txt @@ -24,24 +24,28 @@ include(GrSwig) include_directories(${Boost_INCLUDE_DIRS}) link_directories(${Boost_LIBRARY_DIRS}) +include_directories(${LOG4CXX_INCLUDE_DIRS}) +link_directories(${LOG4CXX_LIBRARY_DIRS}) + set(GR_SWIG_INCLUDE_DIRS ${Boost_INCLUDE_DIRS} ${GSL_INCLUDE_DIRS} ${GRUEL_INCLUDE_DIRS} + ${LOG4CXX_INCLUDE_DIRS} ${GNURADIO_CORE_SWIG_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR} ) -set(GR_SWIG_LIBRARIES gnuradio-core) +set(GR_SWIG_LIBRARIES + gnuradio-core + ${LOG4CXX_LIBRARIES} +) # Only use if log4cxx is installed -# Define DISABLE_GR_LOG for the .i file to ignore it. -if(LOG4CXX_FOUND) - link_directories(${LOG4CXX_LIBRARY_DIRS}) - list(APPEND GR_SWIG_LIBRARIES log4cxx) - list(APPEND GR_SWIG_INCLUDE_DIRS ${LOG4CXX_INCLUDE_DIRS}) -else(LOG4CXX_FOUND) - add_definitions(-DDISABLE_GR_LOG) -endif(LOG4CXX_FOUND) +# Define ENABLE_GR_LOG for the .i file to ignore it. +#if(ENABLE_GR_LOG) +# add_definitions(-DENABLE_GR_LOG) +# SET(GR_SWIG_FLAGS "-DENABLE_GR_LOG") +#endif(ENABLE_GR_LOG) ######################################################################## # Build and install the swig targets @@ -56,7 +60,6 @@ endif(LOG4CXX_FOUND) set(GR_SWIG_TARGET_DEPS gengen_generated filter_generated) foreach(what runtime general gengen filter io hier) - SET(GR_SWIG_FLAGS "-DDISABLE_GR_LOG") SET(GR_SWIG_DOC_FILE ${CMAKE_CURRENT_BINARY_DIR}/${what}_swig_doc.i) SET(GR_SWIG_DOC_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../${what} ${CMAKE_CURRENT_BINARY_DIR}/../${what}) GR_SWIG_MAKE(gnuradio_core_${what} gnuradio_core_${what}.i) |