modify apps/CMakeLists.txt

This commit is contained in:
houzh 2023-06-02 13:16:49 +00:00
parent c35f03dcb0
commit 8a7b2863ab
2 changed files with 17 additions and 13 deletions

View File

@ -1,14 +1,6 @@
if(BUILD_EXAMPLES)
add_subdirectory(samples)
add_subdirectory(uidemo1)
add_subdirectory(uidemo2)
endif(BUILD_EXAMPLES)
add_subdirectory(w9)
add_subdirectory(curldownload)
SUBDIRLIST(APPDIRS ${CMAKE_CURRENT_SOURCE_DIR})
message("APPDIRS=${APPDIRS}")
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/hui-er-pu)
add_subdirectory(hui-er-pu)
endif()
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/wifiwpa)
add_subdirectory(wifiwpa)
endif()
FOREACH(app ${APPDIRS})
ADD_SUBDIRECTORY(${app})
ENDFOREACH()

View File

@ -9,6 +9,18 @@ macro(ADD_WHOLE_ARCHIVE_TO_LIBRARIES _list_name)
set(${_list_name} "${${_list_name}_TMP}")
endmacro()
MACRO(SUBDIRLIST result curdir)
FILE(GLOB children RELATIVE ${curdir} ${curdir}/*)
SET(dirlist "")
FOREACH(child ${children})
IF(IS_DIRECTORY ${curdir}/${child} AND
EXISTS ${curdir}/${child}/CMakeLists.txt)
LIST(APPEND dirlist ${child})
ENDIF()
ENDFOREACH()
SET(${result} ${dirlist})
ENDMACRO()
function(CreatePAK project ResourceDIR PakPath rhpath)
add_custom_target(${project}_assets
COMMAND ${CMAKE_SOURCE_DIR}/scripts/idgen.py ${project} ${ResourceDIR} ${rhpath}