1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
|
cmake_minimum_required( VERSION 3.1.0 )
set( plugins_list
battleshipgameplugin
ripperccplugin
)
if( "${BUILD_PLUGINS}" STREQUAL "ALL" )
set( plugins ${plugins_list} )
else( "${BUILD_PLUGINS}" STREQUAL "ALL" )
set( plugins "${BUILD_PLUGINS}" )
endif( "${BUILD_PLUGINS}" STREQUAL "ALL" )
foreach( plugin ${plugins_list} )
foreach( subdir ${plugins} )
if( ${plugin} STREQUAL ${subdir} )
message("Parse subdirectory: ./${plugin}")
add_subdirectory("./${plugin}")
endif( ${plugin} STREQUAL ${subdir} )
endforeach(subdir)
endforeach(plugin)
|