mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-02 01:41:05 +02:00
CMake: DLL tests should not run if compiled static
This commit is contained in:
parent
b69fafb84c
commit
e239c9de2a
@ -46,10 +46,12 @@ set_target_properties( TestApp PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTI
|
|||||||
target_link_libraries( TestApp PocoFoundation )
|
target_link_libraries( TestApp PocoFoundation )
|
||||||
# TODO: Add TestApp_WINCE
|
# TODO: Add TestApp_WINCE
|
||||||
|
|
||||||
|
if(NOT POCO_STATIC)
|
||||||
# TestLibrary
|
# TestLibrary
|
||||||
add_library( TestLibrary SHARED src/TestLibrary.cpp src/TestPlugin.cpp src/TestPlugin.h )
|
add_library( TestLibrary SHARED src/TestLibrary.cpp src/TestPlugin.cpp src/TestPlugin.h )
|
||||||
set_target_properties( TestLibrary PROPERTIES PREFIX "" DEBUG_POSTFIX "") # The test requires the library named TestLibrary. By default it is prefixed with lib.
|
set_target_properties( TestLibrary PROPERTIES PREFIX "" DEBUG_POSTFIX "") # The test requires the library named TestLibrary. By default it is prefixed with lib.
|
||||||
# The test is run in the runtime directory. So the TestLibrary is built there too because it is used by the tests
|
# The test is run in the runtime directory. So the TestLibrary is built there too because it is used by the tests
|
||||||
set_target_properties( TestLibrary PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} )
|
set_target_properties( TestLibrary PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} )
|
||||||
target_link_libraries( TestLibrary PocoFoundation )
|
target_link_libraries( TestLibrary PocoFoundation )
|
||||||
|
endif()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user