Add goahead.

This commit is contained in:
fancy 2023-12-19 08:28:56 -08:00
parent ae20412ee7
commit fcc0a7b1ec
5 changed files with 41 additions and 2 deletions

View File

@ -19,6 +19,7 @@ all:cmake
clean:
@if [ -d "cmake-shell" ]; then \
echo "cmake-shell exist"; \
make -C cmake-shell External_lib_clean; \
make -C cmake-shell clean; \
fi
@echo "IPC clean."

View File

@ -1,2 +1,9 @@
add_subdirectory(sqlite3/sqlite-3430000)
add_subdirectory(sqlite3/sqlite-3430000)
add_subdirectory(goahead-5.2.0)
add_custom_target(
External_lib_clean
COMMAND rm -rf goahead-5.2.0/GoAhead
WORKING_DIRECTORY ${EXTERNAL_SOURCE_PATH}
)

6
external/README.md vendored
View File

@ -1,3 +1,7 @@
# 1. 第三方库
   该目录存放仓库依赖的三方库源码。
   该目录存放仓库依赖的三方库源码。
## 1.1. goahead
make CC=arm-rockchip830-linux-uclibcgnueabihf-gcc ARCH=arm PROFILE=static

27
external/goahead-5.2.0/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1,27 @@
include(${CMAKE_SOURCE_DIR_IPCSDK}/build/global_config.cmake)
set(EXECUTABLE_OUTPUT_PATH ${EXEC_OUTPUT_PATH})
set(LIBRARY_OUTPUT_PATH ${LIBS_OUTPUT_PATH})
if(${TARGET_PLATFORM} MATCHES ${DEFINE_LINUX})
SET(SET_ARCH "x86")
else()
SET(SET_ARCH "arm")
endif()
# build goahead before make libgo.a
add_custom_command(
OUTPUT ${EXTERNAL_SOURCE_PATH}/goahead-5.2.0/GoAhead/Makefile
COMMAND echo "tar zxvf goahead-5.2.0.tar.gz"
COMMAND tar zxvf goahead-5.2.0.tar.gz
WORKING_DIRECTORY ${EXTERNAL_SOURCE_PATH}/goahead-5.2.0/
)
add_custom_command(
OUTPUT ${EXTERNAL_LIBS_OUTPUT_PATH}/libgo.a
DEPENDS ${EXTERNAL_SOURCE_PATH}/goahead-5.2.0/GoAhead/Makefile
COMMAND make CC=${CMAKE_C_COMPILER} ARCH=${SET_ARCH} PROFILE=static
COMMAND mv ${EXTERNAL_SOURCE_PATH}/goahead-5.2.0/GoAhead/build/linux-${SET_ARCH}-static/bin/libgo.a ${EXTERNAL_LIBS_OUTPUT_PATH}/libgo.a
WORKING_DIRECTORY ${EXTERNAL_SOURCE_PATH}/goahead-5.2.0/GoAhead
)
add_custom_target(
libgo.a
DEPENDS ${EXTERNAL_LIBS_OUTPUT_PATH}/libgo.a
)

Binary file not shown.