SET(LD31_Game_HEADERS
	Application.hpp
	Network.hpp
	Resources.hpp

	View/Camera.hpp
)

SET(LD31_Game_SOURCES
	Application.cpp
	Network.cpp
	Resources.cpp

	View/Camera.cpp
)
SOURCE_GROUP("Header files" REGULAR_EXPRESSION "[^./]+.(hpp|inl)")
SOURCE_GROUP("Source files" REGULAR_EXPRESSION "[^./]+.cpp")

SOURCE_GROUP("Header files\\View" REGULAR_EXPRESSION "View/[^./]+.(hpp|inl)")
SOURCE_GROUP("Source files\\View" REGULAR_EXPRESSION "View/[^./]+.cpp")

INCLUDE_DIRECTORIES(
	${CMAKE_CURRENT_SOURCE_DIR}
)

ADD_EXECUTABLE(LD31_Game
	main.cpp

	${LD31_Game_HEADERS}
	${LD31_Game_SOURCES}
)

TARGET_LINK_LIBRARIES(LD31_Game
	LD31

	${Angelscript_LIBRARIES}
	${FontConfig_LIBRARIES}
	${Nowide_LIBRARIES}
	${SFML_LIBRARIES}

	${CMAKE_THREAD_LIBS_INIT}
)

SET_TARGET_PROPERTIES(LD31_Game PROPERTIES
	RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/bin")

# Only show console on Debug builds

IF(WIN32)
	SET_TARGET_PROPERTIES(LD31_Game PROPERTIES LINK_FLAGS_DEBUG "/SUBSYSTEM:CONSOLE")
	SET_TARGET_PROPERTIES(LD31_Game PROPERTIES COMPILE_DEFINITIONS_DEBUG "_CONSOLE")
	SET_TARGET_PROPERTIES(LD31_Game PROPERTIES LINK_FLAGS_RELWITHDEBINFO "/SUBSYSTEM:CONSOLE")
	SET_TARGET_PROPERTIES(LD31_Game PROPERTIES COMPILE_DEFINITIONS_RELWITHDEBINFO "_CONSOLE")
	SET_TARGET_PROPERTIES(LD31_Game PROPERTIES LINK_FLAGS_RELEASE "/SUBSYSTEM:WINDOWS")
	SET_TARGET_PROPERTIES(LD31_Game PROPERTIES LINK_FLAGS_MINSIZEREL "/SUBSYSTEM:WINDOWS")
ENDIF(WIN32)
