Added SceneItemComponent registry (unfinished)
This commit is contained in:
@ -10,9 +10,11 @@ add_subdirectory(uigen)
|
||||
add_subdirectory(languagegen)
|
||||
add_subdirectory(audiogen)
|
||||
add_subdirectory(generatedlanguages)
|
||||
add_subdirectory(sceneitemcomponentregister)
|
||||
|
||||
# Settings
|
||||
set(DAWN_TOOL_GENERATED_LANG_DIR "${DAWN_TEMP_DIR}/languages" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
set(DAWN_SCENE_ITEM_COMPONENT_LIST "" CACHE INTERNAL ${DAWN_CACHE_TARGET})
|
||||
|
||||
# Texture Tool
|
||||
function(tool_texture target in)
|
||||
@ -66,7 +68,6 @@ function(tool_generatedlanguages in)
|
||||
COMMENT "Generating all languages"
|
||||
DEPENDS generatedlanguagestool
|
||||
)
|
||||
|
||||
if(NOT generatedlanguages IN_LIST DAWN_TARGET_DEPENDENCIES_LAST)
|
||||
set(
|
||||
DAWN_TARGET_DEPENDENCIES_LAST
|
||||
@ -97,6 +98,40 @@ function(tool_audio target in)
|
||||
add_dependencies(${DAWN_TARGET_NAME} ${target})
|
||||
endfunction()
|
||||
|
||||
# Scene Item Component Tool
|
||||
function(tool_scenecomponent clazz hfile)
|
||||
add_custom_target(${clazz}_scenecomponent
|
||||
COMMENT "Registering component ${hfile}::${clazz}"
|
||||
DEPENDS ${ARGN}
|
||||
)
|
||||
set(
|
||||
DAWN_SCENE_ITEM_COMPONENT_LIST
|
||||
${DAWN_SCENE_ITEM_COMPONENT_LIST}
|
||||
${clazz}
|
||||
${hfile}
|
||||
CACHE INTERNAL ${DAWN_CACHE_TARGET}
|
||||
)
|
||||
file(CONFIGURE OUTPUT
|
||||
"${DAWN_TEMP_DIR}/SceneItemComponents.txt"
|
||||
CONTENT "${DAWN_SCENE_ITEM_COMPONENT_LIST}"
|
||||
)
|
||||
if(NOT TARGET sceneitemcomponentgen_cmd)
|
||||
add_custom_target(sceneitemcomponentgen_cmd
|
||||
COMMAND sceneitemcomponentgen --input="${DAWN_TEMP_DIR}/SceneItemComponents.txt" --output="${DAWN_GENERATED_DIR}/scene/SceneItemComponentListItems.hpp"
|
||||
COMMENT "Generating scene item component ${hfile}::${clazz}"
|
||||
DEPENDS sceneitemcomponentgen
|
||||
)
|
||||
endif()
|
||||
target_include_directories(${DAWN_TARGET_NAME}
|
||||
PUBLIC
|
||||
${DAWN_GENERATED_DIR}
|
||||
)
|
||||
add_dependencies(sceneitemcomponentgen ${clazz}_scenecomponent)
|
||||
add_dependencies(${DAWN_TARGET_NAME} sceneitemcomponentgen_cmd)
|
||||
endfunction()
|
||||
|
||||
|
||||
|
||||
|
||||
if(DAWN_VISUAL_NOVEL)
|
||||
add_subdirectory(vnscenegen)
|
||||
|
Reference in New Issue
Block a user