<commit_before>cmake_minimum_required(VERSION 3.9 FATAL_ERROR)

project(mirrage_demo LANGUAGES CXX ASM)

file(GLOB_RECURSE HEADER_FILES
	RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
	${CMAKE_CURRENT_SOURCE_DIR}/*.h*
)

add_executable(demo ${HEADER_FILES}
	src/systems/nim_system.cpp
	src/game_engine.cpp
	src/main.cpp
	src/meta_system.cpp
	src/test_screen.cpp
	src/test_animation_screen.cpp
	${BACKWARD_ENABLE}
)
if(${MIRRAGE_ENABLE_BACKWARD})
	add_backward(demo)
endif()
target_compile_features(demo PUBLIC cxx_std_17)

set(MIRRAGE_DEFAULT_COMPILER_ARGS ${MIRRAGE_DEFAULT_COMPILER_ARGS})
target_compile_options(demo PRIVATE ${MIRRAGE_DEFAULT_COMPILER_ARGS})

target_link_libraries(demo
	PRIVATE
		mirrage::mirrage
		mirrage::renderer
		plog
		glm::glm
		sf2
		doctest
)
if (WIN32)
	target_link_libraries(demo
		PRIVATE
			SDL2::SDL2main
	)
	if(CMAKE_CXX_COMPILER_ID MATCHES GNU)
		target_link_libraries(demo
			PRIVATE
				mingw32
		)
	endif()
endif()

option(MIRRAGE_EXPORT_EXECUTABLE "Export executable" OFF)<commit_msg>Fixed linking order for SDL2main and mingw32 runtime library.<commit_after>cmake_minimum_required(VERSION 3.9 FATAL_ERROR)

project(mirrage_demo LANGUAGES CXX ASM)

file(GLOB_RECURSE HEADER_FILES
	RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
	${CMAKE_CURRENT_SOURCE_DIR}/*.h*
)

add_executable(demo ${HEADER_FILES}
	src/systems/nim_system.cpp
	src/game_engine.cpp
	src/main.cpp
	src/meta_system.cpp
	src/test_screen.cpp
	src/test_animation_screen.cpp
	${BACKWARD_ENABLE}
)
if(${MIRRAGE_ENABLE_BACKWARD})
	add_backward(demo)
endif()
target_compile_features(demo PUBLIC cxx_std_17)

set(MIRRAGE_DEFAULT_COMPILER_ARGS ${MIRRAGE_DEFAULT_COMPILER_ARGS})
target_compile_options(demo PRIVATE ${MIRRAGE_DEFAULT_COMPILER_ARGS})

target_link_libraries(demo
	PRIVATE
		mirrage::mirrage
		mirrage::renderer
		plog
		glm::glm
		sf2
		doctest
)
if (WIN32)
	if(CMAKE_CXX_COMPILER_ID MATCHES GNU)
		target_link_libraries(demo
			PRIVATE
				mingw32
		)
	endif()
	target_link_libraries(demo
		PRIVATE
			SDL2main
	)
endif()

option(MIRRAGE_EXPORT_EXECUTABLE "Export executable" OFF)
{'fraction_non_alphanumeric': 0.08445945945945946, 'fraction_numerical': 0.011583011583011582, 'mean_word_length': 6.912213740458015, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4297788', 'n_tokens_mistral': 917, 'n_tokens_neox': 832, 'n_words': 121}