add_library(EndlessSkyLib OBJECT)

# Set the appropriate compiler flags.
target_include_directories(EndlessSkyLib PUBLIC "${LIBMAD_INCLUDE_DIR}")
if(MSVC)
	target_compile_options(EndlessSkyLib PUBLIC "/W3" "/permissive-" "/sdl" "/GR-" "/analyze-"
		"-Wno-nonportable-include-path" "$<$<CONFIG:Release>:/Gy;/Oi>")
	target_compile_definitions(EndlessSkyLib PUBLIC "_UNICODE" "UNICODE")
else()
	target_compile_options(EndlessSkyLib PUBLIC
		"-Wall" "-pedantic-errors" "-Wold-style-cast" "-fno-rtti")
endif()

# Every source file (and header file) should be listed here, except main.cpp.
# If you add a new file, add it to this list.
target_sources(EndlessSkyLib PRIVATE
	AI.cpp
	AI.h
	Account.cpp
	Account.h
	AlertLabel.cpp
	AlertLabel.h
	AmmoDisplay.cpp
	AmmoDisplay.h
	Angle.cpp
	Angle.h
	Animate.h
	Armament.cpp
	Armament.h
	AsteroidField.cpp
	AsteroidField.h
	BankPanel.cpp
	BankPanel.h
	BatchDrawList.cpp
	BatchDrawList.h
	BatchShader.cpp
	BatchShader.h
	Bitset.cpp
	Bitset.h
	BoardingPanel.cpp
	BoardingPanel.h
	Body.cpp
	Body.h
	CaptureOdds.cpp
	CaptureOdds.h
	CargoHold.cpp
	CargoHold.h
	CategoryList.cpp
	CategoryList.h
	CategoryTypes.h
	ClickZone.h
	Collision.cpp
	Collision.h
	CollisionSet.cpp
	CollisionSet.h
	CollisionType.h
	Color.cpp
	Color.h
	Command.cpp
	Command.h
	ConditionSet.cpp
	ConditionSet.h
	ConditionsStore.cpp
	ConditionsStore.h
	Conversation.cpp
	Conversation.h
	ConversationPanel.cpp
	ConversationPanel.h
	CoreStartData.cpp
	CoreStartData.h
	DamageDealt.h
	DamageProfile.cpp
	DamageProfile.h
	DataFile.cpp
	DataFile.h
	DataNode.cpp
	DataNode.h
	DataWriter.cpp
	DataWriter.h
	Date.cpp
	Date.h
	Depreciation.cpp
	Depreciation.h
	Dialog.cpp
	Dialog.h
	Dictionary.cpp
	Dictionary.h
	DistanceCalculationSettings.h
	DistanceCalculationSettings.cpp
	DistanceMap.cpp
	DistanceMap.h
	Distribution.cpp
	Distribution.h
	DrawList.cpp
	DrawList.h
	Effect.cpp
	Effect.h
	Engine.cpp
	Engine.h
	EsUuid.cpp
	EsUuid.h
	EscortDisplay.cpp
	EscortDisplay.h
	ExclusiveItem.h
	FighterHitHelper.h
	File.cpp
	File.h
	Files.cpp
	Files.h
	FillShader.cpp
	FillShader.h
	FireCommand.cpp
	FireCommand.h
	Fleet.cpp
	Fleet.h
	FleetCargo.cpp
	FleetCargo.h
	Flotsam.cpp
	Flotsam.h
	FogShader.cpp
	FogShader.h
	FormationPattern.cpp
	FormationPattern.h
	FormationPositioner.cpp
	FormationPositioner.h
	FrameTimer.cpp
	FrameTimer.h
	Galaxy.cpp
	Galaxy.h
	GameAction.cpp
	GameAction.h
	GameData.cpp
	GameData.h
	GameEvent.cpp
	GameEvent.h
	GameLoadingPanel.cpp
	GameLoadingPanel.h
	Gamerules.cpp
	Gamerules.h
	GameWindow.cpp
	GameWindow.h
	Government.cpp
	Government.h
	HailPanel.cpp
	HailPanel.h
	Hardpoint.cpp
	Hardpoint.h
	Hazard.cpp
	Hazard.h
	HiringPanel.cpp
	HiringPanel.h
	InfoPanelState.cpp
	InfoPanelState.h
	Information.cpp
	Information.h
	Interface.cpp
	Interface.h
	ItemInfoDisplay.cpp
	ItemInfoDisplay.h
	JumpTypes.h
	Logger.cpp
	Logger.h
	LineShader.cpp
	LineShader.h
	LoadPanel.cpp
	LoadPanel.h
	LocationFilter.cpp
	LocationFilter.h
	LogbookPanel.cpp
	LogbookPanel.h
	MainPanel.cpp
	MainPanel.h
	MapDetailPanel.cpp
	MapDetailPanel.h
	MapOutfitterPanel.cpp
	MapOutfitterPanel.h
	MapPanel.cpp
	MapPanel.h
	MapPlanetCard.cpp
	MapPlanetCard.h
	MapSalesPanel.cpp
	MapSalesPanel.h
	MapShipyardPanel.cpp
	MapShipyardPanel.h
	MenuAnimationPanel.cpp
	MenuAnimationPanel.h
	MenuPanel.cpp
	MenuPanel.h
	MessageLogPanel.cpp
	MessageLogPanel.h
	Messages.cpp
	Messages.h
	Minable.cpp
	Minable.h
	Mission.cpp
	Mission.h
	MissionAction.cpp
	MissionAction.h
	MissionPanel.cpp
	MissionPanel.h
	Mortgage.cpp
	Mortgage.h
	NPC.cpp
	NPC.h
	NPCAction.cpp
	NPCAction.h
	News.cpp
	News.h
	Outfit.cpp
	Outfit.h
	OutfitInfoDisplay.cpp
	OutfitInfoDisplay.h
	OutfitterPanel.cpp
	OutfitterPanel.h
	OutlineShader.cpp
	OutlineShader.h
	Panel.cpp
	Panel.h
	Paragraphs.cpp
	Paragraphs.h
	Person.cpp
	Person.h
	Personality.cpp
	Personality.h
	Phrase.cpp
	Phrase.h
	Planet.cpp
	Planet.h
	PlanetLabel.cpp
	PlanetLabel.h
	PlanetPanel.cpp
	PlanetPanel.h
	PlayerInfo.cpp
	PlayerInfo.h
	PlayerInfoPanel.cpp
	PlayerInfoPanel.h
	Plugins.cpp
	Plugins.h
	Point.cpp
	Point.h
	PointerShader.cpp
	PointerShader.h
	Politics.cpp
	Politics.h
	Port.cpp
	Port.h
	Preferences.cpp
	Preferences.h
	PreferencesPanel.cpp
	PreferencesPanel.h
	PrintData.cpp
	PrintData.h
	Projectile.cpp
	Projectile.h
	Radar.cpp
	Radar.h
	RaidFleet.cpp
	RaidFleet.h
	Random.cpp
	Random.h
	RandomEvent.h
	Rectangle.cpp
	Rectangle.h
	RenderBuffer.cpp
	RenderBuffer.h
	RingShader.cpp
	RingShader.h
	Sale.h
	SavedGame.cpp
	SavedGame.h
	Screen.cpp
	Screen.h
	ScrollBar.cpp
	ScrollBar.h
	ScrollVar.h
	Set.h
	Shader.cpp
	Shader.h
	Ship.cpp
	Ship.h
	ShipEvent.cpp
	ShipEvent.h
	ShipInfoDisplay.cpp
	ShipInfoDisplay.h
	ShipInfoPanel.cpp
	ShipInfoPanel.h
	ShipJumpNavigation.cpp
	ShipJumpNavigation.h
	ShipManager.cpp
	ShipManager.h
	ShipNameDialog.cpp
	ShipNameDialog.h
	ShipyardPanel.cpp
	ShipyardPanel.h
	ShopPanel.cpp
	ShopPanel.h
	SpaceportPanel.cpp
	SpaceportPanel.h
	SpriteShader.cpp
	SpriteShader.h
	StarField.cpp
	StarField.h
	StartConditions.cpp
	StartConditions.h
	StartConditionsPanel.cpp
	StartConditionsPanel.h
	StellarObject.cpp
	StellarObject.h
	StringInterner.cpp
	StringInterner.h
	System.cpp
	System.h
	SystemEntry.h
	TaskQueue.cpp
	TaskQueue.h
	TextArea.cpp
	TextArea.h
	TextReplacements.cpp
	TextReplacements.h
	Trade.cpp
	Trade.h
	TradingPanel.cpp
	TradingPanel.h
	UI.cpp
	UI.h
	UniverseObjects.cpp
	UniverseObjects.h
	Variant.cpp
	Variant.h
	Visual.cpp
	Visual.h
	Weapon.cpp
	Weapon.h
	Weather.cpp
	Weather.h
	WeightedList.h
	Wormhole.cpp
	Wormhole.h
	WormholeStrategy.h
	opengl.cpp
	opengl.h
	pi.h
	shift.h
	audio/Audio.cpp
	audio/Audio.h
	audio/Music.cpp
	audio/Music.h
	audio/Sound.cpp
	audio/Sound.h
	comparators/ByGivenOrder.h
	comparators/ByName.h
	comparators/BySeriesAndIndex.h
	image/ImageBuffer.cpp
	image/ImageBuffer.h
	image/ImageSet.cpp
	image/ImageSet.h
	image/Mask.cpp
	image/Mask.h
	image/MaskManager.cpp
	image/MaskManager.h
	image/Sprite.cpp
	image/Sprite.h
	image/SpriteSet.cpp
	image/SpriteSet.h
	ship/ShipAICache.cpp
	ship/ShipAICache.h
	test/Test.cpp
	test/Test.h
	test/TestContext.cpp
	test/TestContext.h
	test/TestData.cpp
	test/TestData.h
	text/DisplayText.cpp
	text/DisplayText.h
	text/Font.cpp
	text/Font.h
	text/FontSet.cpp
	text/FontSet.h
	text/Format.cpp
	text/Format.h
	text/Table.cpp
	text/Table.h
	text/Utf8.cpp
	text/Utf8.h
	text/WrappedText.cpp
	text/WrappedText.h
	text/alignment.hpp
	text/layout.hpp
	text/truncate.hpp
)
