From 134439cbfab31068befbec850c22a8c214558fbf Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Sun, 6 Dec 2009 11:30:06 -0800 Subject: [PATCH] Portmon CMake build support. --- cmake_modules/ConkyBuildOptions.cmake | 7 +++++++ cmake_modules/ConkyPlatformChecks.cmake | 11 +++++++++++ 2 files changed, 18 insertions(+) diff --git a/cmake_modules/ConkyBuildOptions.cmake b/cmake_modules/ConkyBuildOptions.cmake index 0161c099..f94632f9 100644 --- a/cmake_modules/ConkyBuildOptions.cmake +++ b/cmake_modules/ConkyBuildOptions.cmake @@ -23,3 +23,10 @@ if(BUILD_X11) endif(BUILD_X11) option(BUILD_LUA "Build Lua support" true) + + +# Platform specific options +if(CMAKE_SYSTEM_NAME MATCHES "Linux") + option(BUILD_PORT_MONITORS "Build TCP portmon support" true) +endif(CMAKE_SYSTEM_NAME MATCHES "Linux") + diff --git a/cmake_modules/ConkyPlatformChecks.cmake b/cmake_modules/ConkyPlatformChecks.cmake index d6f5273e..66341ced 100644 --- a/cmake_modules/ConkyPlatformChecks.cmake +++ b/cmake_modules/ConkyPlatformChecks.cmake @@ -60,3 +60,14 @@ if(BUILD_LUA) set(conky_libs ${conky_libs} ${LUA_LIBRARIES}) set(conky_includes ${conky_includes} ${LUA_INCLUDE_DIRS}) endif(BUILD_LUA) + +if(BUILD_PORT_MONITORS) + set(WANT_GLIB true) +endif(BUILD_PORT_MONITORS) + +if(WANT_GLIB) + pkg_check_modules(GLIB REQUIRED glib-2.0) + set(conky_libs ${conky_libs} ${GLIB_LIBRARIES}) + set(conky_includes ${conky_includes} ${GLIB_INCLUDE_DIRS}) +endif(WANT_GLIB) +