mirror of
https://github.com/mwpenny/portal64-still-alive.git
synced 2024-11-26 22:00:25 +00:00
Use more standard luac
file extension when building Skeletool lua files
This commit is contained in:
parent
1c6efda386
commit
efb83d1923
@ -19,20 +19,20 @@ function(_add_embed_lua_command INPUT_FILE OUTPUT_LIST)
|
|||||||
)
|
)
|
||||||
|
|
||||||
set(INPUT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${INPUT_FILE}")
|
set(INPUT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/${INPUT_FILE}")
|
||||||
set(OUTPUT_FILE_OBJ "${PROJECT_BINARY_DIR}/${RELATIVE_CURRENT_DIR}/${INPUT_NAME}.out")
|
set(OUTPUT_FILE_LUAC "${PROJECT_BINARY_DIR}/${RELATIVE_CURRENT_DIR}/${INPUT_NAME}.luac")
|
||||||
set(OUTPUT_FILE_C "${OUTPUT_FILE_OBJ}.c")
|
set(OUTPUT_FILE_C "${OUTPUT_FILE_LUAC}.c")
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
DEPENDS
|
DEPENDS
|
||||||
${EMBED_RESOURCE} ${INPUT_FILE}
|
${EMBED_RESOURCE} ${INPUT_FILE}
|
||||||
OUTPUT
|
OUTPUT
|
||||||
${OUTPUT_FILE_OBJ} ${OUTPUT_FILE_C}
|
${OUTPUT_FILE_LUAC} ${OUTPUT_FILE_C}
|
||||||
COMMAND
|
COMMAND
|
||||||
${Luac_EXECUTABLE} -o ${OUTPUT_FILE_OBJ} ${INPUT_FILE}
|
${Luac_EXECUTABLE} -o ${OUTPUT_FILE_LUAC} ${INPUT_FILE}
|
||||||
COMMAND
|
COMMAND
|
||||||
# Use relative path for nice symbol name
|
# Use relative path for nice symbol name
|
||||||
${CMAKE_COMMAND}
|
${CMAKE_COMMAND}
|
||||||
-D INPUT_FILE=$<PATH:RELATIVE_PATH,${OUTPUT_FILE_OBJ},${PROJECT_BINARY_DIR}>
|
-D INPUT_FILE=$<PATH:RELATIVE_PATH,${OUTPUT_FILE_LUAC},${PROJECT_BINARY_DIR}>
|
||||||
-D OUTPUT_FILE=${OUTPUT_FILE_C}
|
-D OUTPUT_FILE=${OUTPUT_FILE_C}
|
||||||
-P ${EMBED_RESOURCE}
|
-P ${EMBED_RESOURCE}
|
||||||
WORKING_DIRECTORY
|
WORKING_DIRECTORY
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include <lua.hpp>
|
#include <lua.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#define EMIT(name) extern const char _binary_lua_##name##_out[]; extern const size_t _binary_lua_##name##_out_size[];
|
#define EMIT(name) extern const char _binary_lua_##name##_luac[]; extern const size_t _binary_lua_##name##_luac_size[];
|
||||||
#include "LuaFiles.h"
|
#include "LuaFiles.h"
|
||||||
#undef EMIT
|
#undef EMIT
|
||||||
|
|
||||||
@ -25,7 +25,7 @@ struct LuaFile {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct LuaFile luaFiles[] = {
|
struct LuaFile luaFiles[] = {
|
||||||
#define EMIT(name) {_binary_lua_##name##_out, *_binary_lua_##name##_out_size, "lua/" #name ".lua", #name},
|
#define EMIT(name) {_binary_lua_##name##_luac, *_binary_lua_##name##_luac_size, "lua/" #name ".lua", #name},
|
||||||
#include "LuaFiles.h"
|
#include "LuaFiles.h"
|
||||||
#undef EMIT
|
#undef EMIT
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user