mirror of
https://github.com/nyanmisaka/mpp.git
synced 2025-12-26 11:17:44 +01:00
[cmake]: add MODULE_TAG scan script
git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@46 6e48237b-75ef-9749-8fc9-41990f28c85a
This commit is contained in:
parent
7dcdd19bad
commit
2328a54f0c
1 changed files with 16 additions and 0 deletions
|
|
@ -283,6 +283,22 @@ endif(MSVC)
|
|||
option(ENABLE_STATIC "Build shared library" ON)
|
||||
option(ENABLE_SHARED "Build shared library" OFF)
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# scan all LOG_TAG for log information and generate module header file
|
||||
# ----------------------------------------------------------------------------
|
||||
set( module_list "" )
|
||||
file ( GLOB_RECURSE ALL_SRC . *.c;*.cpp )
|
||||
foreach( files ${ALL_SRC} )
|
||||
file( STRINGS ${files} module_tag_line REGEX "MODULE_TAG( )+\".+\"" )
|
||||
if(module_tag_line)
|
||||
string( REGEX REPLACE "^(.)* MODULE_TAG( )+\"(.*)\"" \\3 module_tag ${module_tag_line} )
|
||||
list( APPEND module_list ${module_tag} )
|
||||
endif()
|
||||
endforeach()
|
||||
list( SORT module_list )
|
||||
list( LENGTH module_list module_size )
|
||||
#message(STATUS "module_list: ${module_list}")
|
||||
#message(STATUS "module_size: ${module_size}")
|
||||
|
||||
# ----------------------------------------------------------------------------
|
||||
# Start module definition
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue