Compare commits
2 Commits
b927c3a639
...
458c462bb8
| Author | SHA1 | Date | |
|---|---|---|---|
| 458c462bb8 | |||
| 56ada226f4 |
@ -104,20 +104,20 @@ file(GLOB_RECURSE ASSET_FILES "assets/*")
|
||||
set(ASSET_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/assets")
|
||||
set(ALL_COPIED_ASSETS "")
|
||||
|
||||
# 2. Create a specific copy command for every file
|
||||
foreach(ASSET_PATH ${ASSET_FILES})
|
||||
# Get the relative path so we can recreate the folder structure
|
||||
file(RELATIVE_PATH REL_PATH "${CMAKE_CURRENT_SOURCE_DIR}/assets" ${ASSET_PATH})
|
||||
file(RELATIVE_PATH REL_PATH "${CMAKE_CURRENT_SOURCE_DIR}/assets" "${ASSET_PATH}")
|
||||
set(DEST_PATH "${ASSET_OUTPUT_DIR}/${REL_PATH}")
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${DEST_PATH}
|
||||
COMMAND ${CMAKE_COMMAND} -E copy ${ASSET_PATH} ${DEST_PATH}
|
||||
DEPENDS ${ASSET_PATH}
|
||||
OUTPUT "${DEST_PATH}"
|
||||
COMMAND ${CMAKE_COMMAND} -E copy "${ASSET_PATH}" "${DEST_PATH}"
|
||||
DEPENDS "${ASSET_PATH}"
|
||||
COMMENT "Syncing ${REL_PATH}"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
list(APPEND ALL_COPIED_ASSETS ${DEST_PATH})
|
||||
list(APPEND ALL_COPIED_ASSETS "${DEST_PATH}")
|
||||
endforeach()
|
||||
|
||||
# 3. Create a "dummy" target that the game depends on
|
||||
|
||||
@ -3,7 +3,9 @@
|
||||
|
||||
#include <print>
|
||||
|
||||
#if defined(_WIN32)
|
||||
#include <external/fix_win32_compatibility.h>
|
||||
#endif
|
||||
#include <freetype/freetype.h>
|
||||
#include <hb.h>
|
||||
#include <enet/enet.h>
|
||||
@ -42,7 +44,7 @@ int main() {
|
||||
SetConfigFlags(FLAG_WINDOW_HIGHDPI);
|
||||
InitWindow(screenwidth, screenheight, "raylib");
|
||||
|
||||
MyFont vollkorn("assets/fonts/Vollkorn/static/Vollkorn-Regular.ttf", 60);
|
||||
MyFont vollkorn("assets/fonts/Vollkorn/static/Vollkorn-Regular.ttf", 24);
|
||||
MyFont arabic("assets/fonts/Amiri/Amiri-Regular.ttf", 28);
|
||||
shader = LoadShader(nullptr, "assets/text.frag");
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user