summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2007-06-03 14:15:57 +0000
committerRalf Habacker <ralf.habacker@freenet.de>2007-06-03 14:15:57 +0000
commitdee80a284ae717cea137382cfc7c9b4eb576713d (patch)
tree92f56ac1dded208f130f8bd67c1ffb7197fa02aa /cmake
parentdada2583bff1a30afc8a5c54a6c7122c4c0a469d (diff)
downloaddbus-dee80a284ae717cea137382cfc7c9b4eb576713d.tar.gz
* cmake: added cygwin compile support
Diffstat (limited to 'cmake')
-rw-r--r--cmake/CMakeLists.txt43
-rw-r--r--cmake/ConfigureChecks.cmake3
-rw-r--r--cmake/config.h.cmake9
3 files changed, 51 insertions, 4 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 1df49f64..1eef28e0 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -11,10 +11,16 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.4.4 FATAL_ERROR)
# where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules")
+find_package(KDEWIN_INSTALLER)
+
#enable building of shared library
SET(BUILD_SHARED_LIBS ON)
+if (CYGWIN)
+ set (WIN32)
+endif (CYGWIN)
+
# search packages used by KDE
if (WIN32)
find_package(GNUWIN32)
@@ -143,11 +149,11 @@ ENABLE_TESTING()
#endif(${generatedFileInSourceDir})
#########################################################################
-if (WIN32)
+if (WIN32 OR CYGWIN)
set (LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
-else (WIN32)
+else (WIN32 OR CYGWIN)
set (LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
-endif (WIN32)
+endif (WIN32 OR CYGWIN)
set (EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
@@ -176,6 +182,7 @@ if (NOT DBUS_INSTALL_DIR)
set(DBUS_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" CACHE TYPE STRING)
endif (NOT DBUS_INSTALL_DIR)
+# TODO: setting EXPANDED_... has nothing to do with DBUS_INSTALL_SYSTEM_LIBS
if (DBUS_INSTALL_SYSTEM_LIBS)
set(prefix ${DBUS_INSTALL_DIR})
set(exec_prefix ${prefix})
@@ -198,6 +205,8 @@ else (DBUS_INSTALL_SYSTEM_LIBS)
set(DBUS_MACHINE_UUID_FILE ${CMAKE_BINARY_DIR}/lib/dbus/machine-id)
endif (DBUS_INSTALL_SYSTEM_LIBS)
+set (DBUS_DAEMONDIR ${EXPANDED_BINDIR})
+
########### command line options ###############
# TODO: take check from configure.in
@@ -531,3 +540,31 @@ MESSAGE(" ")
INCLUDE(modules/CPackInstallConfig.cmake)
+
+if (KDEWIN_INSTALLER_FOUND)
+ if (MSVC)
+ add_custom_target(kdewinpackage
+ COMMAND ${KDEWIN_PACKAGER}
+ -name dbus
+ -root ${CMAKE_INSTALL_PREFIX}
+ -srcroot ${CMAKE_SOURCE_DIR}/..
+ -version ${VERSION}
+ -notes "ipc service"
+ -type msvc
+ -strip
+ -complete
+ )
+ else (MSVC)
+ add_custom_target(kdewinpackage
+ COMMAND ${KDEWIN_PACKAGER}
+ -name dbus
+ -root ${CMAKE_INSTALL_PREFIX}
+ -srcroot ${CMAKE_SOURCE_DIR}/..
+ -version ${VERSION}
+ -notes "ipc service"
+ -strip
+ -type mingw
+ -complete
+ )
+ endif (MSVC)
+endif (KDEWIN_INSTALLER_FOUND)
diff --git a/cmake/ConfigureChecks.cmake b/cmake/ConfigureChecks.cmake
index 7798ecc4..dad85db8 100644
--- a/cmake/ConfigureChecks.cmake
+++ b/cmake/ConfigureChecks.cmake
@@ -12,7 +12,7 @@ check_include_file(sys/wait.h HAVE_SYS_WAIT_H)# dbus-sysdeps-win.c
check_include_file(time.h HAVE_TIME_H) # dbus-sysdeps-win.c
check_include_file(unistd.h HAVE_UNISTD_H) # dbus-sysdeps-util-win.c
check_include_file(stdio.h HAVE_STDIO_H) # dbus-sysdeps.h
-
+check_include_file(sys/syslimits.h HAVE_SYS_SYSLIMITS_H) # dbus-sysdeps-unix.c
check_symbol_exists(backtrace "execinfo.h" HAVE_BACKTRACE) # dbus-sysdeps.c, dbus-sysdeps-win.c
check_symbol_exists(getgrouplist "grp.h" HAVE_GETGROUPLIST) # dbus-sysdeps.c
@@ -24,6 +24,7 @@ check_symbol_exists(socketpair "sys/socket.h" HAVE_SOCKETPAIR) #
check_symbol_exists(unsetenv "stdlib.h" HAVE_UNSETENV) # dbus-sysdeps.c
check_symbol_exists(writev "sys/uio.h" HAVE_WRITEV) # dbus-sysdeps.c, dbus-sysdeps-win.c
check_symbol_exists(setrlimit "sys/resource.h" HAVE_SETRLIMIT) # dbus-sysdeps.c, dbus-sysdeps-win.c, test/test-segfault.c
+check_symbol_exists(socklen_t "sys/socket.h" HAVE_SOCKLEN_T) # dbus-sysdeps-unix.c
check_struct_member(cmsgcred cmcred_pid "sys/types.h sys/socket.h" HAVE_CMSGCRED) # dbus-sysdeps.c
diff --git a/cmake/config.h.cmake b/cmake/config.h.cmake
index 5595ee6a..812c836c 100644
--- a/cmake/config.h.cmake
+++ b/cmake/config.h.cmake
@@ -15,11 +15,14 @@
#cmakedefine DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "@DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@"
#cmakedefine DBUS_MACHINE_UUID_FILE "@DBUS_MACHINE_UUID_FILE@"
//#cmakedefine DBUS_SESSION_BUS_DEFAULT_ADDRESS "@DBUS_SESSION_BUS_DEFAULT_ADDRESS@"
+#cmakedefine DBUS_DAEMONDIR "@DBUS_DAEMONDIR@"
#cmakedefine PACKAGE "@PACKAGE@"
/* Version number of package */
#cmakedefine VERSION "@VERSION@"
// test binaries
/* Full path to test file test/test-exit in builddir */
+#define TEST_BUS_BINARY "@TEST_BUS_BINARY@"
+/* Full path to test file test/test-exit in builddir */
#define TEST_EXIT_BINARY "@TEST_EXIT_BINARY@"
/* Full path to test file test/test-segfault in builddir */
#define TEST_SEGFAULT_BINARY "@TEST_SEGFAULT_BINARY@"
@@ -85,6 +88,9 @@
/* Define to 1 if you have stdio.h */
#cmakedefine HAVE_STDIO_H 1
+/* Define to 1 if you have sys/syslimits.h */
+#cmakedefine HAVE_SYS_SYSLIMITS_H 1
+
// symbols
/* Define to 1 if you have backtrace */
#cmakedefine HAVE_BACKTRACE 1
@@ -113,6 +119,9 @@
/* Define to 1 if you have writev */
#cmakedefine HAVE_WRITEV 1
+/* Define to 1 if you have socklen_t */
+#cmakedefine HAVE_SOCKLEN_T 1
+
// structs
/* Define to 1 if you have struct cmsgred */
#cmakedefine HAVE_CMSGCRED 1