diff options
author | Romain Pokrzywka <romain@kdab.com> | 2010-03-29 16:44:57 -0700 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2010-04-13 15:42:10 +0200 |
commit | c60c9601f560b2a08b5e49d8fc802541f0981c15 (patch) | |
tree | 07ce51dba21df7fc01034baa4428417db2c5d25f /cmake | |
parent | 4d8dcd556107e46ab2d4a1b04e4d2ea867b17711 (diff) |
update WinCE cmake support
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/CMakeLists.txt | 60 | ||||
-rw-r--r-- | cmake/dbus/CMakeLists.txt | 20 |
2 files changed, 37 insertions, 43 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 1bae2906..266eed5f 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -114,50 +114,28 @@ endif (UNIX AND NOT DBUS_DISABLE_ASSERTS) SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG") ######################################################################### -# Windows CE +# Windows CE (>= 5.0.0) # -# usage: -# cmake ..\trunk\cmake -Dwince=1 -Dwcelibcex=c:\wcelibcex +# WinCE support now relies on the presence of platform files, found in cmake/modules/platform +# Cmake 2.8.0 doesn't include WinCE platform files by default, but working ones can be found +# on CMake's bugtracker : +# http://public.kitware.com/Bug/view.php?id=7919 # -# change configuration in Visual Studio to 'Pocket PC 2003 (ARMV4)' +# for cmake 2.8.0 get the following patch only : +# http://public.kitware.com/Bug/file_download.php?file_id=2944&type=bug # -if(wince) - project(${CMAKE_PROJECT_NAME}-wince) - # don't forget parameters - set(wince 1 CACHE TYPE STRING FORCE) - set(wcelibcex ${wcelibcex} CACHE TYPE STRING FORCE) - - include_directories(${wcelibcex}/include/wcelibcex ${wcelibcex}/src) - - add_definitions( -# see config.h.cmake -# -DDBUS_WINCE - -DWINCE - -DWIN32_PLATFORM_PSPC - -D_WINDOWS - -D_UNICODE - -DUNICODE - -DPOCKETPC2003_UI_MODEL - ) - - # Windows CE Version - add_definitions( - -D_WIN32_WCE=0x420 - -DWIN32_PLATFORM_PSPC=0x420 - -DUNDER_CE=0x420 - ) - - # Architecture - add_definitions( - -DARM - -D_ARM_ - ) - - set(CMAKE_CXX_STANDARD_LIBRARIES "coredll.lib corelibc.lib ole32.lib oleaut32.lib uuid.lib commctrl.lib ws2.lib") - - set(CMAKE_SHARED_LINKER_FLAGS "/subsystem:windowsce,4.20 /machine:THUMB") - -endif(wince) +# after applying the patch, you can enable the WinCE build by specifying : +# cmake [...] -DCMAKE_SYSTEM_NAME=WinCE -DCMAKE_SYSTEM_VERSION=X.XX +# (where X.XX is your actual WinCE version, e.g. 5.02 for Windows Mobile 6) +# +# Note that you should have a proper cross-compilation environment set up prior to running +# cmake, ie. the PATH, INCLUDE and LIB env vars pointing to your CE SDK/toolchain. +# +if(WINCE) + +MESSAGE("Building for WinCE (${CMAKE_SYSTEM_VERSION})") + +endif(WINCE) ######################################################################### diff --git a/cmake/dbus/CMakeLists.txt b/cmake/dbus/CMakeLists.txt index 57c499f5..52cbf906 100644 --- a/cmake/dbus/CMakeLists.txt +++ b/cmake/dbus/CMakeLists.txt @@ -198,6 +198,14 @@ if (WIN32) ${DBUS_DIR}/dbus-spawn-win.c ${DBUS_DIR}/dbus-sysdeps-util-win.c ) + if(WINCE) + set (DBUS_SHARED_SOURCES ${DBUS_SHARED_SOURCES} + ${DBUS_DIR}/dbus-sysdeps-wince-glue.c + ) + set (DBUS_SHARED_HEADERS ${DBUS_SHARED_HEADERS} + ${DBUS_DIR}/dbus-sysdeps-wince-glue.h + ) + endif(WINCE) else (WIN32) set (DBUS_SHARED_SOURCES ${DBUS_SHARED_SOURCES} ${DBUS_DIR}/dbus-file-unix.c @@ -256,7 +264,11 @@ add_library(dbus-1 SHARED ${DBUS_LIB_HEADERS} ${DBUS_SHARED_HEADERS}) if(WIN32) - target_link_libraries(dbus-1 ws2_32 advapi32 netapi32) + if(WINCE) + target_link_libraries(dbus-1 ws2) + else(WINCE) + target_link_libraries(dbus-1 ws2_32 advapi32 netapi32) + endif(WINCE) endif(WIN32) install_targets(/lib dbus-1 ) @@ -275,7 +287,11 @@ add_library(dbus-internal ${DBUS_INTERNAL_ADD_LIBRARY_OPTIONS} target_link_libraries(dbus-internal) set_target_properties(dbus-internal PROPERTIES COMPILE_FLAGS ${DBUS_INTERNAL_LIBRARY_DEFINITIONS}) if(WIN32) - target_link_libraries(dbus-internal ws2_32 advapi32 netapi32) + if(WINCE) + target_link_libraries(dbus-internal ws2) + else(WINCE) + target_link_libraries(dbus-internal ws2_32 advapi32 netapi32) + endif(WINCE) endif(WIN32) if (DBUS_BUILD_TESTS) |