2022-02-11 03:43:48 +00:00
|
|
|
macro(add_plugin plugin_dir plugin_name)
|
|
|
|
add_subdirectory(${plugin_dir})
|
2022-03-12 21:17:51 +00:00
|
|
|
get_property(PLUGIN_DISABLED GLOBAL PROPERTY "DISABLE_${plugin_name}")
|
|
|
|
if (NOT PLUGIN_DISABLED STREQUAL "true")
|
2022-03-13 23:52:18 +00:00
|
|
|
message(STATUS "[add-plugin] ${BoldGreen}added ${plugin_name}${ColorReset}")
|
2022-03-12 21:17:51 +00:00
|
|
|
add_dependencies(musikcube ${plugin_name})
|
|
|
|
add_dependencies(musikcubed ${plugin_name})
|
|
|
|
add_dependencies(core_c_demo ${plugin_name})
|
|
|
|
else()
|
2022-03-13 23:52:18 +00:00
|
|
|
message(STATUS "[add-plugin] ${BoldRed}skipped ${plugin_name}${ColorReset}")
|
2022-03-12 21:17:51 +00:00
|
|
|
endif()
|
2022-03-13 23:52:18 +00:00
|
|
|
endmacro(add_plugin)
|
|
|
|
|
|
|
|
macro(disable_plugin plugin_name)
|
|
|
|
set(PROPERTY_NAME "DISABLE_${plugin_name}")
|
|
|
|
set_property(GLOBAL PROPERTY ${PROPERTY_NAME} "true")
|
|
|
|
get_property(PLUGIN_DISABLED GLOBAL PROPERTY "DISABLE_${plugin_name}")
|
|
|
|
endmacro(disable_plugin)
|