2014-08-22 17:10:24 +02:00
|
|
|
set(LIBNAME "WinTestRunner")
|
|
|
|
|
|
|
|
# Sources
|
|
|
|
file(GLOB SRCS_G "src/*.cpp")
|
|
|
|
POCO_SOURCES_AUTO( WIN_SRCS ${SRCS_G})
|
|
|
|
|
|
|
|
# Headers
|
|
|
|
file(GLOB_RECURSE HDRS_G "include/*.h" )
|
|
|
|
POCO_HEADERS_AUTO( WIN_SRCS ${HDRS_G})
|
|
|
|
|
|
|
|
file(GLOB_RECURSE HDRS_G "src/*.h" )
|
|
|
|
POCO_HEADERS_AUTO( WIN_SRCS ${HDRS_G})
|
|
|
|
|
|
|
|
# TODO: Is this flag always required?
|
|
|
|
add_definitions("-D_AFXDLL")
|
2014-10-09 13:42:51 +02:00
|
|
|
#TODO: Use instead of the flag above: find_package(MFC)
|
2014-08-22 17:10:24 +02:00
|
|
|
|
2014-10-09 13:42:51 +02:00
|
|
|
add_library( "${LIBNAME}" ${LIB_MODE} ${WIN_SRCS} )
|
|
|
|
set_target_properties( "${LIBNAME}"
|
2014-08-22 17:10:24 +02:00
|
|
|
PROPERTIES
|
|
|
|
VERSION "1" SOVERSION "1"
|
|
|
|
DEFINE_SYMBOL WinTestRunner_EXPORTS)
|
2014-10-09 13:42:51 +02:00
|
|
|
target_link_libraries( "${LIBNAME}" CppUnit )
|
|
|
|
target_include_directories( "${LIBNAME}"
|
|
|
|
PUBLIC
|
|
|
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
|
|
|
$<INSTALL_INTERFACE:include>
|
|
|
|
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src
|
|
|
|
)
|
2015-09-15 10:02:38 +02:00
|
|
|
target_compile_definitions("${LIBNAME}" PUBLIC ${LIB_MODE_DEFINITIONS})
|
2014-10-09 13:42:51 +02:00
|
|
|
|
2014-08-22 17:10:24 +02:00
|
|
|
if(WIN32)
|
|
|
|
target_link_libraries( ${LIBNAME} winmm )
|
|
|
|
endif(WIN32)
|
|
|
|
|
|
|
|
|