fix cmake code smell issues

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
This commit is contained in:
xuxin19 2023-09-04 11:04:29 +08:00 committed by Xiang Xiao
parent c57794fe1f
commit 2432a62ab6
11 changed files with 49 additions and 72 deletions

View file

@ -25,7 +25,7 @@ if(CONFIG_FSUTILS_INIH)
# ############################################################################
set(INIH_DIR ${CMAKE_CURRENT_LIST_DIR}/inih-r42)
if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/inih-r42)
if(NOT EXISTS ${INIH_DIR})
set(INIH_URL https://github.com/benhoyt/inih/archive/r42.tar.gz)
FetchContent_Declare(
inih_fetch
@ -38,8 +38,6 @@ if(CONFIG_FSUTILS_INIH)
if(NOT inih_fetch_POPULATED)
FetchContent_Populate(inih_fetch)
endif()
set(INIH_DIR ${inih_fetch_SOURCE_DIR})
endif()
# ############################################################################

View file

@ -25,7 +25,7 @@ if(CONFIG_FSUTILS_TINYCBOR_LIB)
# ############################################################################
set(TINYCBOR_DIR ${CMAKE_CURRENT_LIST_DIR}/tinycbor)
if(NOT EXISTS ${CMAKE_CURRENT_LIST_DIR}/tinycbor)
if(NOT EXISTS ${TINYCBOR_DIR})
set(TINYCBOR_VERSION 3cba6b11aaa0f6f674cd56ebaa573c4b65f71ee7)
set(TINYCBOR_URL
https://github.com/intel/tinycbor/archive/${TINYCBOR_VERSION}.zip)