Commit dee80a28 authored by Ralf Habacker's avatar Ralf Habacker

* cmake: added cygwin compile support

parent dada2583
2007-06-02 Ralf Habacker <ralf.habacker@freenet.de>
* cmake: added cygwin compile support
2007-06-01 Ralf Habacker <ralf.habacker@freenet.de> 2007-06-01 Ralf Habacker <ralf.habacker@freenet.de>
* tools/dbus-launch-win.c: new file, replaces script wrapper on win32. * tools/dbus-launch-win.c: new file, replaces script wrapper on win32.
......
...@@ -11,10 +11,16 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.4.4 FATAL_ERROR) ...@@ -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 # where to look first for cmake modules, before ${CMAKE_ROOT}/Modules/ is checked
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules") set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/modules")
find_package(KDEWIN_INSTALLER)
#enable building of shared library #enable building of shared library
SET(BUILD_SHARED_LIBS ON) SET(BUILD_SHARED_LIBS ON)
if (CYGWIN)
set (WIN32)
endif (CYGWIN)
# search packages used by KDE # search packages used by KDE
if (WIN32) if (WIN32)
find_package(GNUWIN32) find_package(GNUWIN32)
...@@ -143,11 +149,11 @@ ENABLE_TESTING() ...@@ -143,11 +149,11 @@ ENABLE_TESTING()
#endif(${generatedFileInSourceDir}) #endif(${generatedFileInSourceDir})
######################################################################### #########################################################################
if (WIN32) if (WIN32 OR CYGWIN)
set (LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) set (LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
else (WIN32) else (WIN32 OR CYGWIN)
set (LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib) set (LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/lib)
endif (WIN32) endif (WIN32 OR CYGWIN)
set (EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin) set (EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
...@@ -176,6 +182,7 @@ if (NOT DBUS_INSTALL_DIR) ...@@ -176,6 +182,7 @@ if (NOT DBUS_INSTALL_DIR)
set(DBUS_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" CACHE TYPE STRING) set(DBUS_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}" CACHE TYPE STRING)
endif (NOT DBUS_INSTALL_DIR) endif (NOT DBUS_INSTALL_DIR)
# TODO: setting EXPANDED_... has nothing to do with DBUS_INSTALL_SYSTEM_LIBS
if (DBUS_INSTALL_SYSTEM_LIBS) if (DBUS_INSTALL_SYSTEM_LIBS)
set(prefix ${DBUS_INSTALL_DIR}) set(prefix ${DBUS_INSTALL_DIR})
set(exec_prefix ${prefix}) set(exec_prefix ${prefix})
...@@ -198,6 +205,8 @@ else (DBUS_INSTALL_SYSTEM_LIBS) ...@@ -198,6 +205,8 @@ else (DBUS_INSTALL_SYSTEM_LIBS)
set(DBUS_MACHINE_UUID_FILE ${CMAKE_BINARY_DIR}/lib/dbus/machine-id) set(DBUS_MACHINE_UUID_FILE ${CMAKE_BINARY_DIR}/lib/dbus/machine-id)
endif (DBUS_INSTALL_SYSTEM_LIBS) endif (DBUS_INSTALL_SYSTEM_LIBS)
set (DBUS_DAEMONDIR ${EXPANDED_BINDIR})
########### command line options ############### ########### command line options ###############
# TODO: take check from configure.in # TODO: take check from configure.in
...@@ -531,3 +540,31 @@ MESSAGE(" ") ...@@ -531,3 +540,31 @@ MESSAGE(" ")
INCLUDE(modules/CPackInstallConfig.cmake) 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)
...@@ -12,7 +12,7 @@ check_include_file(sys/wait.h HAVE_SYS_WAIT_H)# dbus-sysdeps-win.c ...@@ -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(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(unistd.h HAVE_UNISTD_H) # dbus-sysdeps-util-win.c
check_include_file(stdio.h HAVE_STDIO_H) # dbus-sysdeps.h 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(backtrace "execinfo.h" HAVE_BACKTRACE) # dbus-sysdeps.c, dbus-sysdeps-win.c
check_symbol_exists(getgrouplist "grp.h" HAVE_GETGROUPLIST) # dbus-sysdeps.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) # ...@@ -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(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(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(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 check_struct_member(cmsgcred cmcred_pid "sys/types.h sys/socket.h" HAVE_CMSGCRED) # dbus-sysdeps.c
......
...@@ -15,11 +15,14 @@ ...@@ -15,11 +15,14 @@
#cmakedefine DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "@DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@" #cmakedefine DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "@DBUS_SYSTEM_BUS_DEFAULT_ADDRESS@"
#cmakedefine DBUS_MACHINE_UUID_FILE "@DBUS_MACHINE_UUID_FILE@" #cmakedefine DBUS_MACHINE_UUID_FILE "@DBUS_MACHINE_UUID_FILE@"
//#cmakedefine DBUS_SESSION_BUS_DEFAULT_ADDRESS "@DBUS_SESSION_BUS_DEFAULT_ADDRESS@" //#cmakedefine DBUS_SESSION_BUS_DEFAULT_ADDRESS "@DBUS_SESSION_BUS_DEFAULT_ADDRESS@"
#cmakedefine DBUS_DAEMONDIR "@DBUS_DAEMONDIR@"
#cmakedefine PACKAGE "@PACKAGE@" #cmakedefine PACKAGE "@PACKAGE@"
/* Version number of package */ /* Version number of package */
#cmakedefine VERSION "@VERSION@" #cmakedefine VERSION "@VERSION@"
// test binaries // test binaries
/* Full path to test file test/test-exit in builddir */ /* 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@" #define TEST_EXIT_BINARY "@TEST_EXIT_BINARY@"
/* Full path to test file test/test-segfault in builddir */ /* Full path to test file test/test-segfault in builddir */
#define TEST_SEGFAULT_BINARY "@TEST_SEGFAULT_BINARY@" #define TEST_SEGFAULT_BINARY "@TEST_SEGFAULT_BINARY@"
...@@ -85,6 +88,9 @@ ...@@ -85,6 +88,9 @@
/* Define to 1 if you have stdio.h */ /* Define to 1 if you have stdio.h */
#cmakedefine HAVE_STDIO_H 1 #cmakedefine HAVE_STDIO_H 1
/* Define to 1 if you have sys/syslimits.h */
#cmakedefine HAVE_SYS_SYSLIMITS_H 1
// symbols // symbols
/* Define to 1 if you have backtrace */ /* Define to 1 if you have backtrace */
#cmakedefine HAVE_BACKTRACE 1 #cmakedefine HAVE_BACKTRACE 1
...@@ -113,6 +119,9 @@ ...@@ -113,6 +119,9 @@
/* Define to 1 if you have writev */ /* Define to 1 if you have writev */
#cmakedefine HAVE_WRITEV 1 #cmakedefine HAVE_WRITEV 1
/* Define to 1 if you have socklen_t */
#cmakedefine HAVE_SOCKLEN_T 1
// structs // structs
/* Define to 1 if you have struct cmsgred */ /* Define to 1 if you have struct cmsgred */
#cmakedefine HAVE_CMSGCRED 1 #cmakedefine HAVE_CMSGCRED 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment