About to relearn this version of the language.

This commit is contained in:
2024-11-25 16:09:56 -06:00
parent f8c008fd45
commit cfa9e0e99a
23 changed files with 178 additions and 60 deletions

View File

@ -3,18 +3,6 @@
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
# Tool Level Values
set(
DAWN_TOOL_INCLUDES
${CMAKE_CURRENT_LIST_DIR}
CACHE INTERNAL ${DAWN_CACHE_TARGET}
)
set(
DAWN_TOOL_GENERATED_DEPENDENCIES
CACHE INTERNAL ${DAWN_CACHE_TARGET}
)
# Tools
add_subdirectory(assetstool)
add_subdirectory(copytool)

View File

@ -3,10 +3,14 @@
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
find_package(Python3 REQUIRED COMPONENTS Interpreter)
add_custom_target(dawnassets
COMMAND ${DAWN_TOOLS_DIR}/assetstool/assetstool.py
COMMAND
${Python3_EXECUTABLE}
${DAWN_TOOLS_DIR}/assetstool/assetstool.py
--input=${DAWN_ASSETS_BUILD_DIR}
--output=${DAWN_BUILD_DIR}/assets.tar
--output=${DAWN_BUILD_DIR}/dawn.tar
COMMENT "Bundling assets..."
USES_TERMINAL
DEPENDS ${DAWN_ASSETS}

View File

@ -3,9 +3,9 @@
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
function(tool_copy target input output)
function(tool_copy target file)
add_custom_target(${target}
COMMAND ${CMAKE_COMMAND} -E copy ${input} ${output}
COMMAND ${CMAKE_COMMAND} -E copy ${DAWN_ASSETS_SOURCE_DIR}/${file} ${DAWN_ASSETS_BUILD_DIR}/${file}
)
add_dependencies(dawnassets ${target})
endfunction()

View File

@ -1,9 +1,5 @@
# Copyright (c) 2021 Dominic Msters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
find_package(Python3 REQUIRED COMPONENTS Interpreter)
# Tool Function
function(tool_texture target)
# Defaults
set(FILE "" )
@ -31,9 +27,9 @@ function(tool_texture target)
message(FATAL_ERROR "Missing FILE input")
endif()
add_custom_target(${target}
add_custom_target(${target}_texture
COMMAND ${DAWN_TOOLS_DIR}/texturetool/texturetool.py
--input="${FILE}"
--input="${DAWN_ASSETS_SOURCE_DIR}/${FILE}"
--output="${DAWN_ASSETS_BUILD_DIR}/${target}.texture"
--wrap-x="${WRAP_X}"
--wrap-y="${WRAP_Y}"
@ -46,5 +42,5 @@ function(tool_texture target)
--crop-end-y="${CROP_END_Y}"
COMMENT "Generating texture ${target} from ${FILE}"
)
add_dependencies(dawnassets ${target})
add_dependencies(dawnassets ${target}_texture)
endfunction()

View File

@ -4,5 +4,5 @@
# https://opensource.org/licenses/MIT
function(tool_truetype target ttf)
tool_copy(${target} ${ttf} ${DAWN_ASSETS_BUILD_DIR}/${target}.ttf)
tool_copy(${target} ${ttf} ${target}.ttf)
endfunction()