Improve the automation of adding modules. now it just requires an input on the cmake list file

This commit is contained in:
jfmcarreira committed 2014-05-12 00:00:07 +01:00
1 parent 5712a01bf9
commit 035c116cd4
5 files changed
+19 -21

No files matched your search

+2 -1
View File
@@ -105,7 +105,8 @@ macro(ADD_MODULE name file )
set(MODULES_LIBS ${MODULES_LIBS} ${__modulename})
add_definitions( -DUSE_${name} )
LIST(APPEND MODULES_LIST ${name} )
file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/moduleslist.cpp "REGISTER_MODULE( ${name} );")
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/ModulesListHeader.h "#include \"${name}.h\"\n")
file(APPEND ${CMAKE_CURRENT_BINARY_DIR}/ModulesListMacro.h "\\\n REGISTER_MODULE( ${name} ); ")
endif()
unset(__modulename)
endmacro()