@@ -47,47 +47,52 @@ set(SOURCES ${SOURCES}
|
|||||||
${CMAKE_CURRENT_LIST_DIR}/src/openpgp/management.c
|
${CMAKE_CURRENT_LIST_DIR}/src/openpgp/management.c
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(USB_ITF_CCID 1)
|
||||||
|
set(USB_ITF_WCID 1)
|
||||||
|
include(pico-keys-sdk/pico_keys_sdk_import.cmake)
|
||||||
|
if(ESP_PLATFORM)
|
||||||
|
project(pico_openpgp)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(INCLUDES ${INCLUDES}
|
set(INCLUDES ${INCLUDES}
|
||||||
${CMAKE_CURRENT_LIST_DIR}/src/openpgp
|
${CMAKE_CURRENT_LIST_DIR}/src/openpgp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(USB_ITF_CCID 1)
|
|
||||||
include(pico-keys-sdk/pico_keys_sdk_import.cmake)
|
|
||||||
if(ESP_PLATFORM)
|
|
||||||
project(pico_fido)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT ESP_PLATFORM)
|
if(NOT ESP_PLATFORM)
|
||||||
target_sources(pico_openpgp PUBLIC ${SOURCES})
|
target_sources(pico_openpgp PUBLIC ${SOURCES})
|
||||||
target_include_directories(pico_openpgp PUBLIC ${INCLUDES})
|
target_include_directories(pico_openpgp PUBLIC ${INCLUDES})
|
||||||
|
|
||||||
target_compile_options(pico_openpgp PUBLIC
|
target_compile_options(pico_openpgp PUBLIC
|
||||||
-Wall
|
-Wall
|
||||||
|
)
|
||||||
|
if(NOT MSVC)
|
||||||
|
target_compile_options(pico_openpgp PUBLIC
|
||||||
-Werror
|
-Werror
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(ENABLE_EMULATION)
|
if(ENABLE_EMULATION)
|
||||||
|
if(NOT MSVC)
|
||||||
target_compile_options(pico_openpgp PUBLIC
|
target_compile_options(pico_openpgp PUBLIC
|
||||||
-fdata-sections
|
-fdata-sections
|
||||||
-ffunction-sections
|
-ffunction-sections
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
target_link_options(pico_openpgp PUBLIC
|
target_link_options(pico_openpgp PUBLIC
|
||||||
-Wl,-dead_strip
|
-Wl,-dead_strip
|
||||||
)
|
)
|
||||||
|
elseif(MSVC)
|
||||||
|
target_compile_options(pico_openpgp PUBLIC
|
||||||
|
-WX
|
||||||
|
)
|
||||||
|
|
||||||
|
target_link_libraries(pico_openpgp PUBLIC wsock32 ws2_32 Bcrypt)
|
||||||
else()
|
else()
|
||||||
target_link_options(pico_openpgp PUBLIC
|
target_link_options(pico_openpgp PUBLIC
|
||||||
-Wl,--gc-sections
|
-Wl,--gc-sections
|
||||||
)
|
)
|
||||||
endif(APPLE)
|
endif(APPLE)
|
||||||
target_link_libraries(pico_openpgp PRIVATE pthread m)
|
target_link_libraries(pico_openpgp PRIVATE pthread m)
|
||||||
else()
|
|
||||||
|
|
||||||
pico_add_extra_outputs(pico_openpgp)
|
|
||||||
|
|
||||||
#target_compile_definitions(pico_openpgp PRIVATE MBEDTLS_ECDSA_DETERMINISTIC=1)
|
|
||||||
|
|
||||||
target_link_libraries(pico_openpgp PRIVATE pico_keys_sdk pico_stdlib tinyusb_device tinyusb_board pico_multicore hardware_flash hardware_sync hardware_adc pico_unique_id pico_aon_timer)
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user