CTest: integrate example as optional test (PRIVATEBIN_IT-gated) and ensure DLL copy; wire example into root CMake
This commit is contained in:
@ -24,4 +24,13 @@ target_link_libraries(example PRIVATE ${PRIVATEBINAPI_LIB} winhttp)
|
||||
|
||||
target_include_directories(example PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../include
|
||||
)
|
||||
)
|
||||
|
||||
# Install/run helpers for tests: copy DLL next to example on Windows
|
||||
if(WIN32)
|
||||
add_custom_command(TARGET example POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
||||
${PRIVATEBINAPI_BUILD_DIR}/Release/privatebinapi.dll
|
||||
$<TARGET_FILE_DIR:example>
|
||||
)
|
||||
endif()
|
||||
Reference in New Issue
Block a user