summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Goldberg <george.goldberg@collabora.co.uk>2009-09-01 11:15:48 (GMT)
committerGeorge Goldberg <george.goldberg@collabora.co.uk>2009-09-11 10:06:50 (GMT)
commit47bb000e23ffa14e8d0d8d00e1895bd23347dc51 (patch)
treec05aa62693ec109b686774cb9c7f86f7447e0635
parent73e2e2a7f8d82c75eadf7d2b7ace05f297db998e (diff)
downloadkrdc-telepathy-standalone-build.tar.gz
krdc-telepathy-standalone-build.tar.xz
Make it build standalone.standalone-build
-rw-r--r--CMakeLists.txt6
-rw-r--r--cmake/modules/FindLibKNotificationItem-1.cmake37
-rw-r--r--cmake/modules/FindLibVNCServer.cmake41
3 files changed, 81 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 958151f..2aed64b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,7 +4,7 @@ project(krdc-telepathy)
if(NOT INSIDE_KDENETWORK)
message("Not building inside KDENetwork, loading KDE CMake Macros.")
- set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/../cmake/modules ${CMAKE_MODULE_PATH})
+ set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/modules ${CMAKE_MODULE_PATH})
find_package(KDE4 REQUIRED)
@@ -33,7 +33,7 @@ if(NOT INSIDE_KDENETWORK)
set(CMAKE_REQUIRED_INCLUDES ${KDEWIN32_INCLUDES})
endif(WIN32)
add_definitions(${QT_DEFINITIONS} ${QT_QTDBUS_DEFINITIONS} ${KDE4_DEFINITIONS})
- include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES})
+ include_directories(${CMAKE_SOURCE_DIR} ${CMAKE_BINARY_DIR} ${KDE4_INCLUDES} ${LIBKNOTIFICATIONITEM-1_INCLUDE_DIR})
macro_optional_find_package(LibVNCServer)
macro_log_feature(LIBVNCSERVER_FOUND "libvncserver" "VNC Server library" "http://libvncserver.sourceforge.net/" FALSE "0.9" "Needed to build Krfb and VNC support in Krdc")
@@ -104,7 +104,7 @@ target_link_libraries(krdc
${KDE4_KIO_LIBS}
${KDE4_KNOTIFYCONFIG_LIBS}
${KDE4_KUTILS_LIBS}
- ${LIBKNOTIFICATIONITEM-1_LIBRARIES}
+ ${LIBKNOTIFICATIONITEM-1_LIBRARY}
krdccore
)
diff --git a/cmake/modules/FindLibKNotificationItem-1.cmake b/cmake/modules/FindLibKNotificationItem-1.cmake
new file mode 100644
index 0000000..b2a1fbb
--- /dev/null
+++ b/cmake/modules/FindLibKNotificationItem-1.cmake
@@ -0,0 +1,37 @@
+# - Find libknotification-1 library
+# Find the libknotification-1. This is an experimental library which is not
+# supposed to stay source- or binary compatible, it may even go away in the future again.
+#
+# This module defines
+# LIBKNOTIFICATIONITEM-1_FOUND - whether the libkonitification-1 library was found
+# LIBKNOTIFICATIONITEM-1_LIBRARIES - the libknotification-1 library
+# LIBKNOTIFICATIONITEM-1_INCLUDE_DIR - the include path of the libknotification-1 library
+
+
+
+find_library (LIBKNOTIFICATIONITEM-1_LIBRARY
+ NAMES
+ knotificationitem-1
+ HINTS
+ ${LIB_INSTALL_DIR}
+ ${KDE4_LIB_DIR}
+)
+
+set(LIBKNOTIFICATIONITEM-1_LIBRARIES ${LIBKNOTIFICATIONITEM-1_LIBRARY})
+
+find_path (LIBKNOTIFICATIONITEM-1_INCLUDE_DIR
+ NAMES
+ knotificationitem.h
+ PATH_SUFFIXES
+ knotificationitem-1
+ HINTS
+ ${INCLUDE_INSTALL_DIR}
+ ${KDE4_INCLUDE_DIR}
+)
+
+
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(LibKNotificationItem-1 DEFAULT_MSG LIBKNOTIFICATIONITEM-1_LIBRARY LIBKNOTIFICATIONITEM-1_INCLUDE_DIR)
+
+mark_as_advanced(LIBKNOTIFICATIONITEM-1_INCLUDE_DIR LIBKNOTIFICATIONITEM-1_LIBRARY)
diff --git a/cmake/modules/FindLibVNCServer.cmake b/cmake/modules/FindLibVNCServer.cmake
new file mode 100644
index 0000000..0c26036
--- /dev/null
+++ b/cmake/modules/FindLibVNCServer.cmake
@@ -0,0 +1,41 @@
+# cmake macro to test LIBVNCSERVER LIB
+
+# Copyright (c) 2006, Alessandro Praduroux <pradu@pradu.it>
+# Copyright (c) 2007, Urs Wolfer <uwolfer @ kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+INCLUDE(CheckPointerMember)
+
+IF (LIBVNCSERVER_INCLUDE_DIR AND LIBVNCSERVER_LIBRARIES)
+ # Already in cache, be silent
+ SET(LIBVNCSERVER_FIND_QUIETLY TRUE)
+ENDIF (LIBVNCSERVER_INCLUDE_DIR AND LIBVNCSERVER_LIBRARIES)
+
+FIND_PATH(LIBVNCSERVER_INCLUDE_DIR rfb/rfb.h)
+
+FIND_LIBRARY(LIBVNCSERVER_LIBRARIES NAMES vncserver libvncserver)
+
+# libvncserver and libvncclient are in the same package, so it does
+# not make sense to add a new cmake script for finding libvncclient.
+# instead just find the libvncclient also in this file.
+FIND_PATH(LIBVNCCLIENT_INCLUDE_DIR rfb/rfbclient.h)
+FIND_LIBRARY(LIBVNCCLIENT_LIBRARIES NAMES vncclient libvncclient)
+
+IF (LIBVNCSERVER_INCLUDE_DIR AND LIBVNCSERVER_LIBRARIES)
+ SET(CMAKE_REQUIRED_INCLUDES "${LIBVNCSERVER_INCLUDE_DIR}" "${CMAKE_REQUIRED_INCLUDES}")
+ CHECK_POINTER_MEMBER(rfbClient* GotXCutText rfb/rfbclient.h LIBVNCSERVER_FOUND)
+ENDIF (LIBVNCSERVER_INCLUDE_DIR AND LIBVNCSERVER_LIBRARIES)
+
+IF (LIBVNCSERVER_FOUND)
+ IF (NOT LIBVNCSERVER_FIND_QUIETLY)
+ MESSAGE(STATUS "Found LibVNCServer: ${LIBVNCSERVER_LIBRARIES}")
+ ENDIF (NOT LIBVNCSERVER_FIND_QUIETLY)
+ELSE (LIBVNCSERVER_FOUND)
+ IF (LIBVNCSERVER_FIND_REQUIRED)
+ MESSAGE(FATAL_ERROR "Could NOT find acceptable version of LibVNCServer (version 0.9 or later required).")
+ ENDIF (LIBVNCSERVER_FIND_REQUIRED)
+ENDIF (LIBVNCSERVER_FOUND)
+
+MARK_AS_ADVANCED(LIBVNCSERVER_INCLUDE_DIR LIBVNCSERVER_LIBRARIES)