mirror of
https://github.com/apache/nuttx.git
synced 2025-01-13 08:38:38 +08:00
cmake:fix 7300 cmake build fail,init gpsutils cmake build
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
This commit is contained in:
parent
b17c074a18
commit
e03fba1ad4
1 changed files with 25 additions and 12 deletions
|
@ -17,32 +17,45 @@
|
|||
# the License.
|
||||
#
|
||||
# ##############################################################################
|
||||
|
||||
nuttx_generate_kconfig(MENUDESC "GPS Utilities")
|
||||
|
||||
if(CONFIG_GPSUTILS_MINMEA_LIB)
|
||||
|
||||
set(MINMEA_DIR ${CMAKE_CURRENT_LIST_DIR}/minmea)
|
||||
if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/minmea)
|
||||
|
||||
if(NOT EXISTS ${MINMEA_DIR})
|
||||
set(MINMEA_URL https://github.com/kosma/minmea/archive)
|
||||
set(MINMEA_VERSION db46128e73cee26d6a6eb0482dcba544ee1ea9f5)
|
||||
|
||||
FetchContent_Declare(
|
||||
minmea_fetch
|
||||
URL ${MINMEA_URL}/${MINMEA_VERSION}.zip SOURCE_DIR
|
||||
${CMAKE_CURRENT_LIST_DIR}/minmea BINARY_DIR
|
||||
minmea
|
||||
DOWNLOAD_DIR ${CMAKE_CURRENT_LIST_DIR}
|
||||
URL "https://github.com/kosma/minmea/archive/${MINMEA_VERSION}.zip"
|
||||
SOURCE_DIR
|
||||
${CMAKE_CURRENT_LIST_DIR}/minmea
|
||||
BINARY_DIR
|
||||
${CMAKE_BINARY_DIR}/libs/libc/gpsutils/minmea
|
||||
CONFIGURE_COMMAND
|
||||
""
|
||||
BUILD_COMMAND
|
||||
""
|
||||
INSTALL_COMMAND
|
||||
""
|
||||
TEST_COMMAND
|
||||
""
|
||||
DOWNLOAD_NO_PROGRESS true
|
||||
TIMEOUT 30)
|
||||
|
||||
FetchContent_GetProperties(minmea_fetch)
|
||||
FetchContent_GetProperties(minmea)
|
||||
|
||||
if(NOT minmea_fetch_POPULATED)
|
||||
FetchContent_Populate(minmea_fetch)
|
||||
if(NOT minmea_POPULATED)
|
||||
FetchContent_Populate(minmea)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS ${CMAKE_BINARY_DIR}/include/minmea)
|
||||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/include/minmea)
|
||||
endif()
|
||||
|
||||
configure_file(${CMAKE_CURRENT_LIST_DIR}/minmea/minmea.h
|
||||
${CMAKE_BINARY_DIR}/include/minmea/minmea.h COPYONLY)
|
||||
|
||||
target_sources(c PRIVATE minmea/minmea.c)
|
||||
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue