Fixes build on the laptop? dunno why
This commit is contained in:
@@ -89,13 +89,7 @@ endif()
|
|||||||
# Add code
|
# Add code
|
||||||
add_subdirectory(src)
|
add_subdirectory(src)
|
||||||
|
|
||||||
# Include generated headers
|
|
||||||
target_include_directories(${DUSK_TARGET_NAME} PUBLIC
|
|
||||||
${DUSK_GENERATED_HEADERS_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
# Build assets
|
# Build assets
|
||||||
# message(FATAL_ERROR "Building assets for game: ${DUSK_ASSETS}")
|
|
||||||
add_custom_target(DUSK_ASSETS_BUILT ALL
|
add_custom_target(DUSK_ASSETS_BUILT ALL
|
||||||
COMMAND
|
COMMAND
|
||||||
${Python3_EXECUTABLE} ${DUSK_TOOLS_DIR}/assetstool/main.py
|
${Python3_EXECUTABLE} ${DUSK_TOOLS_DIR}/assetstool/main.py
|
||||||
@@ -103,12 +97,16 @@ add_custom_target(DUSK_ASSETS_BUILT ALL
|
|||||||
--build-type wad
|
--build-type wad
|
||||||
--output-assets ${DUSK_BUILT_ASSETS_DIR}
|
--output-assets ${DUSK_BUILT_ASSETS_DIR}
|
||||||
--output-file ${DUSK_BUILD_DIR}/dusk.dsk
|
--output-file ${DUSK_BUILD_DIR}/dusk.dsk
|
||||||
--output-headers ${DUSK_GENERATED_HEADERS_DIR}/asset/assetbundle.h
|
|
||||||
--headers-dir ${DUSK_GENERATED_HEADERS_DIR}
|
--headers-dir ${DUSK_GENERATED_HEADERS_DIR}
|
||||||
--input ${DUSK_ASSETS}
|
--input ${DUSK_ASSETS}
|
||||||
)
|
)
|
||||||
add_dependencies(${DUSK_TARGET_NAME} DUSK_ASSETS_BUILT)
|
add_dependencies(${DUSK_TARGET_NAME} DUSK_ASSETS_BUILT)
|
||||||
|
|
||||||
|
# Include generated headers
|
||||||
|
target_include_directories(${DUSK_TARGET_NAME} PUBLIC
|
||||||
|
${DUSK_GENERATED_HEADERS_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
# Postbuild
|
# Postbuild
|
||||||
if(DUSK_TARGET_SYSTEM STREQUAL "psp")
|
if(DUSK_TARGET_SYSTEM STREQUAL "psp")
|
||||||
create_pbp_file(
|
create_pbp_file(
|
||||||
|
@@ -8,7 +8,7 @@ function(add_asset ASSET_TYPE ASSET_PATH)
|
|||||||
set(FULL_ASSET_PATH "${CMAKE_CURRENT_LIST_DIR}/${ASSET_PATH}")
|
set(FULL_ASSET_PATH "${CMAKE_CURRENT_LIST_DIR}/${ASSET_PATH}")
|
||||||
string(JOIN "%" ASSETS_ARGS ${ARGN})
|
string(JOIN "%" ASSETS_ARGS ${ARGN})
|
||||||
list(APPEND DUSK_ASSETS
|
list(APPEND DUSK_ASSETS
|
||||||
"${ASSET_TYPE}#${FULL_ASSET_PATH}#${ASSETS_ARGS}$"
|
"${ASSET_TYPE}#${FULL_ASSET_PATH}#${ASSETS_ARGS}"
|
||||||
)
|
)
|
||||||
set(DUSK_ASSETS ${DUSK_ASSETS} CACHE INTERNAL ${DUSK_CACHE_TARGET})
|
set(DUSK_ASSETS ${DUSK_ASSETS} CACHE INTERNAL ${DUSK_CACHE_TARGET})
|
||||||
endfunction()
|
endfunction()
|
@@ -21,7 +21,6 @@ for inputArg in args.input:
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
pieces = file.split('#')
|
pieces = file.split('#')
|
||||||
print(f"Input arg: {pieces}")
|
|
||||||
|
|
||||||
if len(pieces) < 2:
|
if len(pieces) < 2:
|
||||||
print(f"Error: Invalid input asset format '{file}'. Expected format: type#path[#option1%option2...]")
|
print(f"Error: Invalid input asset format '{file}'. Expected format: type#path[#option1%option2...]")
|
||||||
@@ -39,7 +38,7 @@ for inputArg in args.input:
|
|||||||
options[partSplit[0]] = partSplit[1]
|
options[partSplit[0]] = partSplit[1]
|
||||||
else:
|
else:
|
||||||
options[partSplit[0]] = True
|
options[partSplit[0]] = True
|
||||||
|
|
||||||
inputAssets.append({
|
inputAssets.append({
|
||||||
'type': pieces[0],
|
'type': pieces[0],
|
||||||
'path': pieces[1],
|
'path': pieces[1],
|
||||||
|
Reference in New Issue
Block a user