mirror of
https://gitee.com/jiuyilian/embedded-framework.git
synced 2025-01-06 10:16:51 -05:00
Improve compile script.
This commit is contained in:
parent
17205de4c6
commit
339466aecf
4
external/libconfig/build_libconfig.sh
vendored
4
external/libconfig/build_libconfig.sh
vendored
|
@ -17,12 +17,12 @@ if [ ! -f "./libconfig-1.7.3/lib/.libs/libconfig++.a" ] || [ ! -f "./libconfig-1
|
||||||
case $platform in
|
case $platform in
|
||||||
"linux")
|
"linux")
|
||||||
echo "==Compile linux."
|
echo "==Compile linux."
|
||||||
./configure
|
./configure --disable-cxx --enable-static=yes
|
||||||
make
|
make
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "==Compile cross compile."
|
echo "==Compile cross compile."
|
||||||
./configure --host=$CROSS_COMPILER
|
./configure --host=$CROSS_COMPILER --disable-cxx --enable-static=yes
|
||||||
make
|
make
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -21,7 +21,7 @@ aux_source_directory(./src SRC_FILES)
|
||||||
|
|
||||||
set(TARGET_NAME ConfigBase)
|
set(TARGET_NAME ConfigBase)
|
||||||
add_library(${TARGET_NAME} STATIC ${SRC_FILES})
|
add_library(${TARGET_NAME} STATIC ${SRC_FILES})
|
||||||
target_link_libraries(${TARGET_NAME} StatusCode Log config++)
|
target_link_libraries(${TARGET_NAME} StatusCode Log libconfig.a)
|
||||||
|
|
||||||
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
|
if ("${CLANG_TIDY_SUPPORT}" MATCHES "true")
|
||||||
add_custom_target(
|
add_custom_target(
|
||||||
|
@ -45,15 +45,15 @@ endif()
|
||||||
|
|
||||||
# build libconfig before make libConfig.a
|
# build libconfig before make libConfig.a
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${EXTERNAL_SOURCE_PATH}/libconfig/libconfig-1.7.3/lib/.libs/libconfig++.a
|
OUTPUT ${EXTERNAL_SOURCE_PATH}/libconfig/libconfig-1.7.3/lib/.libs/libconfig.a
|
||||||
COMMAND echo "Build libconfig-1.7.3. CMAKE_C_COMPILER = ${CMAKE_C_COMPILER}"
|
COMMAND echo "Build libconfig-1.7.3. CMAKE_C_COMPILER = ${CMAKE_C_COMPILER}"
|
||||||
# COMMAND tar zxvf libconfig-1.7.3.tar.gz
|
# COMMAND tar zxvf libconfig-1.7.3.tar.gz
|
||||||
COMMAND sh build_libconfig.sh ${TARGET_PLATFORM} ${CROSS_COMPILER_PATH} ${CMAKE_C_COMPILER}
|
COMMAND sh build_libconfig.sh ${TARGET_PLATFORM} ${CROSS_COMPILER_PATH} ${CMAKE_C_COMPILER}
|
||||||
WORKING_DIRECTORY ${EXTERNAL_SOURCE_PATH}/libconfig
|
WORKING_DIRECTORY ${EXTERNAL_SOURCE_PATH}/libconfig
|
||||||
)
|
)
|
||||||
add_custom_target(
|
add_custom_target(
|
||||||
config++
|
libconfig.a
|
||||||
DEPENDS ${EXTERNAL_SOURCE_PATH}/libconfig/libconfig-1.7.3/lib/.libs/libconfig++.a
|
DEPENDS ${EXTERNAL_SOURCE_PATH}/libconfig/libconfig-1.7.3/lib/.libs/libconfig.a
|
||||||
)
|
)
|
||||||
|
|
||||||
# add_custom_command(
|
# add_custom_command(
|
||||||
|
|
Loading…
Reference in New Issue
Block a user