cmake_minimum_required(VERSION 3.16)
project(gmtk-2024)

set(CMAKE_CXX_STANDARD 20)
set(PSEMEK_EXAMPLES OFF)
set(PSEMEK_APPLICATION_NAME ColorFractory)

set(PSEMEK_PACKAGE_OUTPUT_PATH package)
set(PSEMEK_GRAPHICS_API OPENGL)

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/*")

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()
