From a1d04b536202c6b8bc4994c56c515896acc74a98 Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Fri, 2 Sep 2022 18:17:10 +0200 Subject: [PATCH] Add CMake file Signed-off-by: Pol Henarejos --- CMakeLists.txt | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..e8f37d3 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,48 @@ + # + # This file is part of the Pico FIDO distribution (https://github.com/polhenarejos/pico-fido). + # Copyright (c) 2022 Pol Henarejos. + # + # This program is free software: you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by + # the Free Software Foundation, version 3. + # + # This program is distributed in the hope that it will be useful, but + # WITHOUT ANY WARRANTY; without even the implied warranty of + # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + # General Public License for more details. + # + # You should have received a copy of the GNU General Public License + # along with this program. If not, see . + # + +cmake_minimum_required(VERSION 3.13) + +include(pico_sdk_import.cmake) + +project(pico_fido C CXX ASM) + +set(CMAKE_C_STANDARD 11) +set(CMAKE_CXX_STANDARD 17) + +pico_sdk_init() + +add_executable(pico_fido) + +target_sources(pico_fido PUBLIC + ${CMAKE_CURRENT_LIST_DIR}/src/fido/fido.c + ) +set(HSM_DRIVER "hid") +include(pico-hsm-sdk/pico_hsm_sdk_import.cmake) + +target_include_directories(pico_fido PUBLIC + ${CMAKE_CURRENT_LIST_DIR}/src/fido + ) + +target_compile_options(pico_fido PUBLIC + -Wall + -Werror +) + +pico_add_extra_outputs(pico_fido) + +target_link_libraries(pico_fido PRIVATE pico_hsm_sdk pico_stdlib pico_multicore hardware_flash hardware_sync hardware_adc pico_unique_id hardware_rtc tinyusb_device tinyusb_board)