mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-22 08:02:06 +02:00
CMake, WinCE: Make samples and tests compile under Windows CE
This commit is contained in:
@@ -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
|
||||||
|
@@ -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 )
|
||||||
|
@@ -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 )
|
||||||
|
@@ -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 )
|
||||||
|
@@ -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 )
|
||||||
|
@@ -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 )
|
||||||
|
@@ -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 )
|
||||||
|
Reference in New Issue
Block a user