CMake, WinCE: Make samples and tests compile under Windows CE

This commit is contained in:
Pascal Bach
2014-12-11 13:25:40 +01:00
committed by Pascal Bach
parent 10ef2b2335
commit 97ea3ef483
7 changed files with 24 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ POCO_SOURCES_AUTO_PLAT( TEST_SRCS OFF
src/WinDriver.cpp src/WinDriver.cpp
) )
POCO_SOURCES_PLAT( TEST_SRCS FoundationTest WINCE POCO_SOURCES_AUTO_PLAT( TEST_SRCS WINCE
src/WinCEDriver.cpp 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 ) COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/data )
# TestApp # 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 ) 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 # 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} ) set_target_properties( TestApp PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} )
target_link_libraries( TestApp PocoFoundation ) target_link_libraries( TestApp PocoFoundation )
# TODO: Add TestApp_WINCE
if(NOT POCO_STATIC) if(NOT POCO_STATIC)
# TestLibrary # TestLibrary

View File

@@ -4,4 +4,7 @@ set(LOCAL_SRCS "")
aux_source_directory(src LOCAL_SRCS) aux_source_directory(src LOCAL_SRCS)
add_executable( ${SAMPLE_NAME} ${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 ) target_link_libraries( ${SAMPLE_NAME} PocoNet PocoUtil PocoJSON PocoXML PocoFoundation )

View File

@@ -4,4 +4,7 @@ set(LOCAL_SRCS "")
aux_source_directory(src LOCAL_SRCS) aux_source_directory(src LOCAL_SRCS)
add_executable( ${SAMPLE_NAME} ${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 ) target_link_libraries( ${SAMPLE_NAME} PocoUtil PocoJSON PocoXML PocoFoundation )

View File

@@ -4,4 +4,7 @@ set(LOCAL_SRCS "")
aux_source_directory(src LOCAL_SRCS) aux_source_directory(src LOCAL_SRCS)
add_executable( ${SAMPLE_NAME} ${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 ) target_link_libraries( ${SAMPLE_NAME} PocoUtil PocoJSON PocoXML PocoFoundation )

View File

@@ -4,4 +4,7 @@ set(LOCAL_SRCS "")
aux_source_directory(src LOCAL_SRCS) aux_source_directory(src LOCAL_SRCS)
add_executable( ${SAMPLE_NAME} ${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 ) target_link_libraries( ${SAMPLE_NAME} PocoUtil PocoJSON PocoXML PocoFoundation )

View File

@@ -4,4 +4,7 @@ set(LOCAL_SRCS "")
aux_source_directory(src LOCAL_SRCS) aux_source_directory(src LOCAL_SRCS)
add_executable( ${SAMPLE_NAME} ${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 ) target_link_libraries( ${SAMPLE_NAME} PocoZip PocoUtil PocoXML PocoFoundation )

View File

@@ -4,4 +4,7 @@ set(LOCAL_SRCS "")
aux_source_directory(src LOCAL_SRCS) aux_source_directory(src LOCAL_SRCS)
add_executable( ${SAMPLE_NAME} ${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 ) target_link_libraries( ${SAMPLE_NAME} PocoZip PocoUtil PocoXML PocoFoundation )