From fda4ba18b4ebf958cca90ed7351f0164345576a4 Mon Sep 17 00:00:00 2001 From: John Sanpe Date: Mon, 31 Mar 2025 11:28:56 +0800 Subject: [PATCH] feat platform: added windows and android platform support Signed-off-by: John Sanpe --- scripts/CMakeLists.txt | 11 +++++------ scripts/platform.cmake | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 76a0b802..1b5fdc6b 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -23,12 +23,11 @@ host_target(gen-crc64be gen-crc64be.c) macro(generate_crctbl proc path name table rows poly trans) add_custom_command( TARGET ${proc} POST_BUILD - COMMAND bash -c \" - mkdir -p ${BFDEV_GENERATED_PATH}/bfdev/crypto && - ${PROJECT_BINARY_DIR}/scripts/${proc} - ${name} ${table} ${rows} ${poly} ${trans} > - ${BFDEV_GENERATED_PATH}/bfdev/crypto/${path} - \" + COMMAND ${CMAKE_COMMAND} -E make_directory + ${BFDEV_GENERATED_PATH}/bfdev/crypto + COMMAND ${PROJECT_BINARY_DIR}/scripts/${proc} + ${name} ${table} ${rows} ${poly} ${trans} > + ${BFDEV_GENERATED_PATH}/bfdev/crypto/${path} ) endmacro() diff --git a/scripts/platform.cmake b/scripts/platform.cmake index 4c70afdd..2e7f7e15 100644 --- a/scripts/platform.cmake +++ b/scripts/platform.cmake @@ -26,11 +26,11 @@ macro(print_type output name) endif() endmacro() -if(CMAKE_SYSTEM_NAME MATCHES "Linux|Darwin|GNU") +if(CMAKE_SYSTEM_NAME MATCHES "Linux|Android|Darwin|GNU") set(BFDEV_PORT_TYPE "posix") endif() -if(CMAKE_SYSTEM_NAME MATCHES "MSYS|CYGWIN") +if(CMAKE_SYSTEM_NAME MATCHES "Windows|MSYS|CYGWIN") set(BFDEV_PORT_TYPE "posix") endif()