Refactor CMakeLists.txt and set name to index.html in web builds

This commit is contained in:
Nikita Lisitsa 2026-07-07 13:12:01 +03:00
parent 18a0676f16
commit b97651ab1d

View file

@ -13,5 +13,14 @@ add_subdirectory(psemek)
file(GLOB_RECURSE GMTK_SOURCES LIST_DIRECTORIES FALSE "${CMAKE_CURRENT_SOURCE_DIR}/source/*")
file(GLOB_RECURSE GMTK_HEADERS LIST_DIRECTORIES FALSE "${CMAKE_CURRENT_SOURCE_DIR}/include/*")
psemek_add_application(color-fractory ${GMTK_SOURCES} ${GMTK_HEADERS})
psemek_package_files(color-fractory sounds)
set(TARGET_NAME color-fractory)
psemek_add_application(${TARGET_NAME} ${GMTK_SOURCES} ${GMTK_HEADERS})
psemek_package_files(${TARGET_NAME} sounds)
if(TARGET color-fractory)
if(PSEMEK_PLATFORM_WEB)
# Required by itch.io
set_target_properties(${TARGET_NAME} PROPERTIES
OUTPUT_NAME "index"
)
endif()
endif()