mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-01-15 13:00:17 +01:00
update WinCE cmake support
This commit is contained in:
parent
3ac6915e3c
commit
4708efeebb
2 changed files with 35 additions and 41 deletions
|
|
@ -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)
|
||||
# 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)
|
||||
|
||||
include_directories(${wcelibcex}/include/wcelibcex ${wcelibcex}/src)
|
||||
MESSAGE("Building for WinCE (${CMAKE_SYSTEM_VERSION})")
|
||||
|
||||
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)
|
||||
endif(WINCE)
|
||||
#########################################################################
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue