summaryrefslogtreecommitdiffstats
path: root/CMakeScripts
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeScripts')
-rw-r--r--CMakeScripts/DefineDependsandFlags.cmake13
-rw-r--r--CMakeScripts/Modules/FindDBus.cmake72
-rw-r--r--CMakeScripts/Modules/FindGTK2.cmake (renamed from CMakeScripts/Modules/FindGTK2_patched.cmake)0
-rwxr-xr-xCMakeScripts/cmake_consistency_check.py5
4 files changed, 86 insertions, 4 deletions
diff --git a/CMakeScripts/DefineDependsandFlags.cmake b/CMakeScripts/DefineDependsandFlags.cmake
index 96ff53ff9..40c759741 100644
--- a/CMakeScripts/DefineDependsandFlags.cmake
+++ b/CMakeScripts/DefineDependsandFlags.cmake
@@ -40,13 +40,24 @@ list(APPEND INKSCAPE_INCS_SYS ${POPT_INCLUDE_DIR})
list(APPEND INKSCAPE_LIBS ${POPT_LIBRARIES})
add_definitions(${POPT_DEFINITIONS})
+if(WITH_DBUS)
+ find_package(DBus REQUIRED)
+ if(DBUS_FOUND)
+ list(APPEND INKSCAPE_INCS_SYS ${DBUS_INCLUDE_DIR})
+ list(APPEND INKSCAPE_INCS_SYS ${DBUS_ARCH_INCLUDE_DIR})
+ list(APPEND INKSCAPE_LIBS ${DBUS_LIBRARIES})
+ else()
+ set(WITH_DBUS OFF)
+ endif()
+endif()
+
# ----------------------------------------------------------------------------
# CMake's builtin
# ----------------------------------------------------------------------------
# Include dependencies:
# use patched version until GTK2_CAIROMMCONFIG_INCLUDE_DIR is added
-find_package(GTK2_patched COMPONENTS gtk gtkmm REQUIRED)
+find_package(GTK2 COMPONENTS gtk gtkmm REQUIRED)
list(APPEND INKSCAPE_INCS_SYS
${GTK2_GDK_INCLUDE_DIR}
${GTK2_GDKMM_INCLUDE_DIR}
diff --git a/CMakeScripts/Modules/FindDBus.cmake b/CMakeScripts/Modules/FindDBus.cmake
new file mode 100644
index 000000000..f227cc297
--- /dev/null
+++ b/CMakeScripts/Modules/FindDBus.cmake
@@ -0,0 +1,72 @@
+# - Try to find the low-level D-Bus library
+# Once done this will define
+#
+# DBUS_FOUND - system has D-Bus
+# DBUS_INCLUDE_DIR - the D-Bus include directory
+# DBUS_ARCH_INCLUDE_DIR - the D-Bus architecture-specific include directory
+# DBUS_LIBRARIES - the libraries needed to use D-Bus
+
+# Copyright (c) 2008, Kevin Kofler, <kevin.kofler@chello.at>
+# modeled after FindLibArt.cmake:
+# Copyright (c) 2006, Alexander Neundorf, <neundorf@kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+if (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES)
+
+ # in cache already
+ SET(DBUS_FOUND TRUE)
+
+else (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES)
+
+ IF (NOT WIN32)
+ FIND_PACKAGE(PkgConfig)
+ IF (PKG_CONFIG_FOUND)
+ # use pkg-config to get the directories and then use these values
+ # in the FIND_PATH() and FIND_LIBRARY() calls
+ pkg_check_modules(_DBUS_PC QUIET dbus-1)
+ ENDIF (PKG_CONFIG_FOUND)
+ ENDIF (NOT WIN32)
+
+ FIND_PATH(DBUS_INCLUDE_DIR dbus/dbus.h
+ ${_DBUS_PC_INCLUDE_DIRS}
+ /usr/include
+ /usr/include/dbus-1.0
+ /usr/local/include
+ )
+
+ FIND_PATH(DBUS_ARCH_INCLUDE_DIR dbus/dbus-arch-deps.h
+ ${_DBUS_PC_INCLUDE_DIRS}
+ /usr/lib${LIB_SUFFIX}/include
+ /usr/lib${LIB_SUFFIX}/dbus-1.0/include
+ /usr/lib64/include
+ /usr/lib64/dbus-1.0/include
+ /usr/lib/include
+ /usr/lib/dbus-1.0/include
+ )
+
+ FIND_LIBRARY(DBUS_LIBRARIES NAMES dbus-1 dbus
+ PATHS
+ ${_DBUS_PC_LIBDIR}
+ )
+
+
+ if (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES)
+ set(DBUS_FOUND TRUE)
+ endif (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES)
+
+
+ if (DBUS_FOUND)
+ if (NOT DBus_FIND_QUIETLY)
+ message(STATUS "Found D-Bus: ${DBUS_LIBRARIES}")
+ endif (NOT DBus_FIND_QUIETLY)
+ else (DBUS_FOUND)
+ if (DBus_FIND_REQUIRED)
+ message(FATAL_ERROR "Could NOT find D-Bus")
+ endif (DBus_FIND_REQUIRED)
+ endif (DBUS_FOUND)
+
+ MARK_AS_ADVANCED(DBUS_INCLUDE_DIR DBUS_ARCH_INCLUDE_DIR DBUS_LIBRARIES)
+
+endif (DBUS_INCLUDE_DIR AND DBUS_ARCH_INCLUDE_DIR AND DBUS_LIBRARIES)
diff --git a/CMakeScripts/Modules/FindGTK2_patched.cmake b/CMakeScripts/Modules/FindGTK2.cmake
index 91249b787..91249b787 100644
--- a/CMakeScripts/Modules/FindGTK2_patched.cmake
+++ b/CMakeScripts/Modules/FindGTK2.cmake
diff --git a/CMakeScripts/cmake_consistency_check.py b/CMakeScripts/cmake_consistency_check.py
index d70a6a7e9..cf0889b74 100755
--- a/CMakeScripts/cmake_consistency_check.py
+++ b/CMakeScripts/cmake_consistency_check.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
-# $Id: cmake_consistency_check.py 36708 2011-05-16 06:11:14Z gsrb3d $
+# $Id: cmake_consistency_check.py 38013 2011-07-01 12:33:34Z campbellbarton $
# ***** BEGIN GPL LICENSE BLOCK *****
#
# This program is free software; you can redistribute it and/or
@@ -26,7 +26,7 @@
from cmake_consistency_check_config import IGNORE, UTF8_CHECK, SOURCE_DIR
import os
-from os.path import join, dirname, normpath, abspath, splitext
+from os.path import join, dirname, normpath, splitext
print("Scanning:", SOURCE_DIR)
@@ -183,7 +183,6 @@ def is_ignore(f):
# First do stupid check, do these files exist?
print("\nChecking for missing references:")
-import sys
is_err = False
errs = []
for f in (global_h | global_c):