From 747c873606c34fb45bef36b525bdc7929d5e362a Mon Sep 17 00:00:00 2001 From: Bhavik Patel Date: Mon, 27 Jul 2020 17:22:44 +0200 Subject: Add install target in the cmake script Change-Id: I44d6220ac488d2e67c0b6a8b005c8da0b9a67011 --- CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index b857280..ff099c6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,6 +38,10 @@ set_property(CACHE ETHOSU_LOG_SEVERITY PROPERTY STRINGS ${LOG_NAMES}) if(CMAKE_SYSTEM_PROCESSOR STREQUAL "cortex-m0") add_compile_definitions(CPU_CORTEX_M0) +elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "cortex-m1") + add_compile_definitions(CPU_CORTEX_M1) +elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "cortex-m23") + add_compile_definitions(CPU_CORTEX_M23) elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "cortex-m3") add_compile_definitions(CPU_CORTEX_M3) elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL "cortex-m33") @@ -79,6 +83,11 @@ target_sources(ethosu_core_driver PRIVATE src/ethosu_driver.c src/ethosu_device. # Set the log level for the target target_compile_definitions(ethosu_core_driver PRIVATE ETHOSU_LOG_SEVERITY=${LOG_SEVERITY}) +# Install library and include files +install(TARGETS ethosu_core_driver LIBRARY DESTINATION "lib") +install(FILES include/ethosu_device.h include/ethosu_driver.h include/pmu_ethosu.h + DESTINATION "include") + # # Print build status # -- cgit v1.2.1