* cmake: added cygwin compile support
authorRalf Habacker <ralf.habacker@freenet.de>
Sun, 3 Jun 2007 14:15:57 +0000 (14:15 +0000)
committerRalf Habacker <ralf.habacker@freenet.de>
Sun, 3 Jun 2007 14:15:57 +0000 (14:15 +0000)
ChangeLog
cmake/CMakeLists.txt
cmake/ConfigureChecks.cmake
cmake/config.h.cmake

index d77d552..62a994d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2007-06-02  Ralf Habacker  <ralf.habacker@freenet.de>
+
+       * cmake: added cygwin compile support
+
 2007-06-01  Ralf Habacker  <ralf.habacker@freenet.de>
 
        * tools/dbus-launch-win.c: new file, replaces script wrapper on win32.
index 1df49f6..1eef28e 100644 (file)
@@ -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)
index 7798ecc..dad85db 100644 (file)
@@ -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
 
index 5595ee6..812c836 100644 (file)
 #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
 /* 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