diff --git a/Foundation/testsuite/CMakeLists.txt b/Foundation/testsuite/CMakeLists.txt index a0007db02..02c8dca5f 100644 --- a/Foundation/testsuite/CMakeLists.txt +++ b/Foundation/testsuite/CMakeLists.txt @@ -20,7 +20,7 @@ POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF src/WinDriver.cpp ) -POCO_SOURCES_PLAT( TEST_SRCS FoundationTest WINCE +POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE src/WinCEDriver.cpp ) @@ -38,11 +38,15 @@ add_custom_command(TARGET ${TESTUNIT} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/data ) # TestApp +if(WINCE) +add_executable( TestApp src/TestApp_WINCE.cpp ) +set_target_properties(TestApp PROPERTIES LINK_FLAGS "/ENTRY:wmainCRTStartup") +else() add_executable( TestApp src/TestApp.cpp ) +endif() # The test is run in the runtime directory. So the TestApp is built there too because it is used by the tests set_target_properties( TestApp PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} ) target_link_libraries( TestApp PocoFoundation ) -# TODO: Add TestApp_WINCE if(NOT POCO_STATIC) # TestLibrary diff --git a/Net/samples/WebSocketServer/CMakeLists.txt b/Net/samples/WebSocketServer/CMakeLists.txt index 3ebda2493..ceba96d63 100644 --- a/Net/samples/WebSocketServer/CMakeLists.txt +++ b/Net/samples/WebSocketServer/CMakeLists.txt @@ -4,4 +4,7 @@ set(LOCAL_SRCS "") aux_source_directory(src LOCAL_SRCS) add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} ) +if(WINCE) +set_target_properties( ${SAMPLE_NAME} PROPERTIES LINK_FLAGS "/ENTRY:wmainCRTStartup") +endif() target_link_libraries( ${SAMPLE_NAME} PocoNet PocoUtil PocoJSON PocoXML PocoFoundation ) diff --git a/Util/samples/SampleApp/CMakeLists.txt b/Util/samples/SampleApp/CMakeLists.txt index 74df9e7de..e11469f27 100644 --- a/Util/samples/SampleApp/CMakeLists.txt +++ b/Util/samples/SampleApp/CMakeLists.txt @@ -4,4 +4,7 @@ set(LOCAL_SRCS "") aux_source_directory(src LOCAL_SRCS) add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} ) +if(WINCE) +set_target_properties( ${SAMPLE_NAME} PROPERTIES LINK_FLAGS "/ENTRY:wmainCRTStartup") +endif() target_link_libraries( ${SAMPLE_NAME} PocoUtil PocoJSON PocoXML PocoFoundation ) diff --git a/Util/samples/SampleServer/CMakeLists.txt b/Util/samples/SampleServer/CMakeLists.txt index b743e4ab9..ccef003a8 100644 --- a/Util/samples/SampleServer/CMakeLists.txt +++ b/Util/samples/SampleServer/CMakeLists.txt @@ -4,4 +4,7 @@ set(LOCAL_SRCS "") aux_source_directory(src LOCAL_SRCS) add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} ) +if(WINCE) +set_target_properties( ${SAMPLE_NAME} PROPERTIES LINK_FLAGS "/ENTRY:wmainCRTStartup") +endif() target_link_libraries( ${SAMPLE_NAME} PocoUtil PocoJSON PocoXML PocoFoundation ) diff --git a/Util/samples/pkill/CMakeLists.txt b/Util/samples/pkill/CMakeLists.txt index 5e248d7f3..2b2ed8de5 100644 --- a/Util/samples/pkill/CMakeLists.txt +++ b/Util/samples/pkill/CMakeLists.txt @@ -4,4 +4,7 @@ set(LOCAL_SRCS "") aux_source_directory(src LOCAL_SRCS) add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} ) +if(WINCE) +set_target_properties( ${SAMPLE_NAME} PROPERTIES LINK_FLAGS "/ENTRY:wmainCRTStartup") +endif() target_link_libraries( ${SAMPLE_NAME} PocoUtil PocoJSON PocoXML PocoFoundation ) diff --git a/Zip/samples/unzip/CMakeLists.txt b/Zip/samples/unzip/CMakeLists.txt index 9305205ba..10586a7ed 100644 --- a/Zip/samples/unzip/CMakeLists.txt +++ b/Zip/samples/unzip/CMakeLists.txt @@ -4,4 +4,7 @@ set(LOCAL_SRCS "") aux_source_directory(src LOCAL_SRCS) add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} ) +if(WINCE) +set_target_properties( ${SAMPLE_NAME} PROPERTIES LINK_FLAGS "/ENTRY:wmainCRTStartup") +endif() target_link_libraries( ${SAMPLE_NAME} PocoZip PocoUtil PocoXML PocoFoundation ) diff --git a/Zip/samples/zip/CMakeLists.txt b/Zip/samples/zip/CMakeLists.txt index 224ee1aa7..3196b46a1 100644 --- a/Zip/samples/zip/CMakeLists.txt +++ b/Zip/samples/zip/CMakeLists.txt @@ -4,4 +4,7 @@ set(LOCAL_SRCS "") aux_source_directory(src LOCAL_SRCS) add_executable( ${SAMPLE_NAME} ${LOCAL_SRCS} ) +if(WINCE) +set_target_properties( ${SAMPLE_NAME} PROPERTIES LINK_FLAGS "/ENTRY:wmainCRTStartup") +endif() target_link_libraries( ${SAMPLE_NAME} PocoZip PocoUtil PocoXML PocoFoundation )