From 19c9a1e8acc5a735efc130a82e3fbace18b4176d Mon Sep 17 00:00:00 2001 From: Alberto Riccardo Martinelli Date: Wed, 13 Mar 2019 15:34:03 +0100 Subject: [PATCH] [#55] export PiCo as target --- CMakeLists.txt | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c05b595..bad1be70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,9 +71,7 @@ set( "Runtime system to be used as backend (Default=FF, Supported=FF)") include(config) - include_directories(./include) - # Unit testing if (PICO_ENABLE_UNIT_TEST) include(CTest) @@ -129,3 +127,34 @@ if(CLANG_FORMAT_EXE) ${ALL_CXX_SOURCE_FILES} ) endif() + + +# add PiCo as a linkable target +add_library(PiCo INTERFACE) + +target_include_directories(PiCo + INTERFACE + $ + $ +) + +# provide a namespaced alias for clients to link against if PiCo is included as a sub-project +add_library(PiCo::PiCo ALIAS PiCo) + +# add PiCo as a linkable target +add_library(Fastflow INTERFACE) + +target_include_directories(Fastflow + INTERFACE + $ + $ +) + +# provide a namespaced alias for clients to link against if PiCo is included as a sub-project +add_library(Fastflow::Fastflow ALIAS Fastflow) + + +target_link_libraries(PiCo INTERFACE Catch2::Catch2) +target_link_libraries(PiCo INTERFACE Fastflow::Fastflow) +target_link_libraries(PiCo INTERFACE ${PICO_RUNTIME_LIB}) +