cmake_minimum_required(VERSION 2.8)

PROJECT(trinlibr)

ADD_DEFINITIONS(-DLINUX -fPIC -O3)
SET(StandardFlags "-std=c++0x -Wall -Wno-reorder -Wno-unknown-pragmas -Wno-switch -Wno-unused-function -I../GGE -I../")


SET(Assets
	../Source/Assets/Animation.cpp
	../Source/Assets/Artisan.cpp
	../Source/Assets/Buildings.cpp
	../Source/Assets/Constants.cpp
	../Source/Assets/Item.cpp
	../Source/Assets/Load.cpp
	../Source/Assets/Map.cpp
	../Source/Assets/Object.cpp
	../Source/Assets/Tile.cpp
	../Source/Assets/Townsfolk.cpp
	../Source/Assets/Wildling.cpp

)

SET(Graphics
	../Source/Graphics/Animation.cpp
	../Source/Graphics/Map.cpp
	../Source/Graphics/Tile.cpp
)

SET(Project
	../Source/Basic.cpp
	../Source/Instantiation.cpp
	../Source/Main.cpp
)

SET(Interface
	../Source/Interface/Interface.cpp
)

SET(Mechanics
	../Source/Interface/Interface.cpp
	../Source/Mechanics/Armors/BaseArmor.cpp
	../Source/Mechanics/Armors/BodyArmor.cpp
	../Source/Mechanics/Artisan.cpp
	../Source/Mechanics/Den.cpp
	../Source/Mechanics/FloatingLogger.cpp
	../Source/Mechanics/Human.cpp
	../Source/Mechanics/Item.cpp
	../Source/Mechanics/Map.cpp
	../Source/Mechanics/PlayerGame.cpp
	../Source/Mechanics/Soldier.cpp
	../Source/Mechanics/TownBuilding.cpp
	../Source/Mechanics/Townsfolk.cpp
	../Source/Mechanics/Weapons/BaseWeapon.cpp
	../Source/Mechanics/Weapons/MeleeWeapon.cpp
	../Source/Mechanics/Wildling.cpp
	../Source/Mechanics/MilitaryBuilding.cpp
)


FOREACH(_file ${Assets} ${Graphics} ${Project} ${Mechanics})
	SET_SOURCE_FILES_PROPERTIES(${_file} PROPERTIES COMPILE_FLAGS ${StandardFlags})
ENDFOREACH()


SET(sources
	${Assets}
	${Graphics}
	${Project}
	${Mechanics}
)

ADD_SUBDIRECTORY(../GGE "../GGE")
ADD_SUBDIRECTORY(../Gorgon "../Gorgon")


ADD_EXECUTABLE(trinlibr ${Assets} ${Graphics} ${Project} ${Mechanics})

TARGET_LINK_LIBRARIES(trinlibr GGE)
TARGET_LINK_LIBRARIES(trinlibr Gorgon)
