diff --git a/CMakeLists.txt b/CMakeLists.txt index faf8138..65070d6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,25 @@ cmake_minimum_required(VERSION 3.10) project(checkm8_tool) -enable_language(C) +enable_language(C ASM) + +include(${CMAKE_ROOT}/Modules/ExternalProject.cmake) include_directories(c8_remote/include) include_directories(include) +ExternalProject_Add(checkm8_arduino + PREFIX c8_arduino/ + SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/c8_arduino/ + BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/checkm8_arduino + INSTALL_COMMAND "") + +ExternalProject_Add_Step(checkm8_arduino upload + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/checkm8_arduino/ + COMMAND cmake --build . --target upload + DEPENDEES build + EXCLUDE_FROM_MAIN true) + +ExternalProject_add_StepTargets(checkm8_arduino upload build) + add_subdirectory(c8_remote/lib) add_subdirectory(c8_remote) diff --git a/c8_remote/lib/CMakeLists.txt b/c8_remote/lib/CMakeLists.txt index f6c3411..eb375aa 100644 --- a/c8_remote/lib/CMakeLists.txt +++ b/c8_remote/lib/CMakeLists.txt @@ -1,5 +1,3 @@ -project(checkm8_libpayload) - set(PL_NAMES aes_busy aes_sw diff --git a/c8_remote/lib/payload/CMakeLists.txt b/c8_remote/lib/payload/CMakeLists.txt index e032c13..2d09bab 100644 --- a/c8_remote/lib/payload/CMakeLists.txt +++ b/c8_remote/lib/payload/CMakeLists.txt @@ -1,8 +1,6 @@ -project(checkm8_libpayload_sources C ASM) include_directories(${CMAKE_CURRENT_LIST_DIR}/include) - - set(CMAKE_SYSTEM_PROCESSOR arm) + if(${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "x86_64") # regular desktop set(CMAKE_C_COMPILER /usr/bin/aarch64-linux-gnu-gcc)