cmake: Auto-create user directory for portable mode

Suggested-by: dr.stug@citron-emu.org
Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
Zephyron
2025-10-08 16:21:14 +10:00
parent c1a6f2d47b
commit c98d253040
3 changed files with 28 additions and 1 deletions

View File

@@ -46,6 +46,14 @@ if(UNIX AND NOT APPLE)
install(TARGETS citron-room)
endif()
# Create the "user" directory for portable mode on Windows
if(WIN32)
add_custom_command(TARGET citron-room POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory "$<TARGET_FILE_DIR:citron-room>/user"
COMMENT "Creating portable user directory for citron-room"
)
endif()
if (CITRON_USE_PRECOMPILED_HEADERS)
target_precompile_headers(citron-room PRIVATE precompiled_headers.h)
endif()