Port the last example

This commit is contained in:
Martin Hořeňovský
2019-12-08 20:57:55 +01:00
parent 70ef2f7f12
commit 29b441949c
4 changed files with 28 additions and 5 deletions

View File

@@ -229,3 +229,20 @@ target_include_directories(Catch2
$<BUILD_INTERFACE:${SOURCES_DIR}/..>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
function(StampOutLibrary target)
add_library(Catch2_${target} STATIC
${REPORTER_FILES}
${INTERNAL_FILES}
${BENCHMARK_HEADERS}
${BENCHMARK_SOURCES}
)
target_include_directories(Catch2_${target}
PUBLIC
$<BUILD_INTERFACE:${SOURCES_DIR}/..>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
)
target_link_libraries(${target} Catch2_${target})
endfunction()