Skip to content

Commit 97ea3ef

Browse files
committed
CMake, WinCE: Make samples and tests compile under Windows CE
1 parent 10ef2b2 commit 97ea3ef

File tree

7 files changed

+24
-2
lines changed

7 files changed

+24
-2
lines changed

Foundation/testsuite/CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
2020
src/WinDriver.cpp
2121
)
2222

23-
POCO_SOURCES_PLAT( TEST_SRCS FoundationTest WINCE
23+
POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
2424
src/WinCEDriver.cpp
2525
)
2626

@@ -38,11 +38,15 @@ add_custom_command(TARGET ${TESTUNIT} POST_BUILD
3838
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/data )
3939

4040
# TestApp
41+
if(WINCE)
42+
add_executable( TestApp src/TestApp_WINCE.cpp )
43+
set_target_properties(TestApp PROPERTIES LINK_FLAGS "/ENTRY:wmainCRTStartup")
44+
else()
4145
add_executable( TestApp src/TestApp.cpp )
46+
endif()
4247
# The test is run in the runtime directory. So the TestApp is built there too because it is used by the tests
4348
set_target_properties( TestApp PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} )
4449
target_link_libraries( TestApp PocoFoundation )
45-
# TODO: Add TestApp_WINCE
4650

4751
if(NOT POCO_STATIC)
4852
# TestLibrary

Net/samples/WebSocketServer/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ set(LOCAL_SRCS "")
44
aux_source_directory(src LOCAL_SRCS)
55

66
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
7+
if(WINCE)
8+
set_target_properties( ${SAMPLE_NAME} PROPERTIES LINK_FLAGS "/ENTRY:wmainCRTStartup")
9+
endif()
710
target_link_libraries( ${SAMPLE_NAME} PocoNet PocoUtil PocoJSON PocoXML PocoFoundation )

Util/samples/SampleApp/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ set(LOCAL_SRCS "")
44
aux_source_directory(src LOCAL_SRCS)
55

66
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
7+
if(WINCE)
8+
set_target_properties( ${SAMPLE_NAME} PROPERTIES LINK_FLAGS "/ENTRY:wmainCRTStartup")
9+
endif()
710
target_link_libraries( ${SAMPLE_NAME} PocoUtil PocoJSON PocoXML PocoFoundation )

Util/samples/SampleServer/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ set(LOCAL_SRCS "")
44
aux_source_directory(src LOCAL_SRCS)
55

66
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
7+
if(WINCE)
8+
set_target_properties( ${SAMPLE_NAME} PROPERTIES LINK_FLAGS "/ENTRY:wmainCRTStartup")
9+
endif()
710
target_link_libraries( ${SAMPLE_NAME} PocoUtil PocoJSON PocoXML PocoFoundation )

Util/samples/pkill/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ set(LOCAL_SRCS "")
44
aux_source_directory(src LOCAL_SRCS)
55

66
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
7+
if(WINCE)
8+
set_target_properties( ${SAMPLE_NAME} PROPERTIES LINK_FLAGS "/ENTRY:wmainCRTStartup")
9+
endif()
710
target_link_libraries( ${SAMPLE_NAME} PocoUtil PocoJSON PocoXML PocoFoundation )

Zip/samples/unzip/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ set(LOCAL_SRCS "")
44
aux_source_directory(src LOCAL_SRCS)
55

66
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
7+
if(WINCE)
8+
set_target_properties( ${SAMPLE_NAME} PROPERTIES LINK_FLAGS "/ENTRY:wmainCRTStartup")
9+
endif()
710
target_link_libraries( ${SAMPLE_NAME} PocoZip PocoUtil PocoXML PocoFoundation )

Zip/samples/zip/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,7 @@ set(LOCAL_SRCS "")
44
aux_source_directory(src LOCAL_SRCS)
55

66
add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} )
7+
if(WINCE)
8+
set_target_properties( ${SAMPLE_NAME} PROPERTIES LINK_FLAGS "/ENTRY:wmainCRTStartup")
9+
endif()
710
target_link_libraries( ${SAMPLE_NAME} PocoZip PocoUtil PocoXML PocoFoundation )

0 commit comments

Comments
 (0)