Skip to content

Commit 328de55

Browse files
authored
Merge pull request #669 from sanpeqf/feat-platform
feat platform: added windows and android platform support
2 parents eb3beb1 + fda4ba1 commit 328de55

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

scripts/CMakeLists.txt

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,11 @@ host_target(gen-crc64be gen-crc64be.c)
2323
macro(generate_crctbl proc path name table rows poly trans)
2424
add_custom_command(
2525
TARGET ${proc} POST_BUILD
26-
COMMAND bash -c \"
27-
mkdir -p ${BFDEV_GENERATED_PATH}/bfdev/crypto &&
28-
${PROJECT_BINARY_DIR}/scripts/${proc}
29-
${name} ${table} ${rows} ${poly} ${trans} >
30-
${BFDEV_GENERATED_PATH}/bfdev/crypto/${path}
31-
\"
26+
COMMAND ${CMAKE_COMMAND} -E make_directory
27+
${BFDEV_GENERATED_PATH}/bfdev/crypto
28+
COMMAND ${PROJECT_BINARY_DIR}/scripts/${proc}
29+
${name} ${table} ${rows} ${poly} ${trans} >
30+
${BFDEV_GENERATED_PATH}/bfdev/crypto/${path}
3231
)
3332
endmacro()
3433

scripts/platform.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ macro(print_type output name)
2626
endif()
2727
endmacro()
2828

29-
if(CMAKE_SYSTEM_NAME MATCHES "Linux|Darwin|GNU")
29+
if(CMAKE_SYSTEM_NAME MATCHES "Linux|Android|Darwin|GNU")
3030
set(BFDEV_PORT_TYPE "posix")
3131
endif()
3232

33-
if(CMAKE_SYSTEM_NAME MATCHES "MSYS|CYGWIN")
33+
if(CMAKE_SYSTEM_NAME MATCHES "Windows|MSYS|CYGWIN")
3434
set(BFDEV_PORT_TYPE "posix")
3535
endif()
3636

0 commit comments

Comments
 (0)