# All of these will be set as PUBLIC sources to Acid
set(_temp_acid_headers
		Animations/Animation/Animation.hpp
		Animations/Animation/AnimationLoader.hpp
		Animations/Animation/JointTransform.hpp
		Animations/Animation/Keyframe.hpp
		Animations/Animator.hpp
		Animations/Geometry/GeometryLoader.hpp
		Animations/Geometry/VertexAnimated.hpp
		Animations/MeshAnimated.hpp
		Animations/Skeleton/Joint.hpp
		Animations/Skeleton/SkeletonLoader.hpp
		Animations/Skin/SkinLoader.hpp
		Animations/Skin/VertexWeights.hpp
		Audio/Audio.hpp
		Audio/Flac/SoundBufferFlac.hpp
		Audio/Mp3/SoundBufferMp3.hpp
		Audio/Ogg/SoundBufferOgg.hpp
		Audio/Opus/SoundBufferOpus.hpp
		Audio/Sound.hpp
		Audio/SoundBuffer.hpp
		Audio/Wave/SoundBufferWave.hpp
		Bitmaps/Bitmap.hpp
		Bitmaps/Png/BitmapPng.hpp
		Devices/Instance.hpp
		Devices/Joysticks.hpp
		Devices/Keyboard.hpp
		Devices/LogicalDevice.hpp
		Devices/Monitor.hpp
		Devices/Mouse.hpp
		Devices/PhysicalDevice.hpp
		Devices/Surface.hpp
		Devices/Window.hpp
		Engine/App.hpp
		Engine/Engine.hpp
		Engine/Log.hpp
		Engine/Module.hpp
		Files/File.hpp
		Files/FileObserver.hpp
		Files/Files.hpp
		Files/Json/Json.hpp
		Files/Node.hpp
		Files/Node.inl
		Files/NodeConstView.hpp
		Files/NodeConstView.inl
		Files/NodeView.hpp
		Files/NodeView.inl
		Files/Xml/Xml.hpp
		Files/Zip/miniz.h
		Files/Zip/ZipArchive.hpp
		Files/Zip/ZipEntry.hpp
		Files/Zip/ZipException.hpp
		Fonts/FontType.hpp
		Fonts/msdf.h
		Fonts/SubrenderFonts.hpp
		Fonts/Text.hpp
		Gizmos/Gizmo.hpp
		Gizmos/Gizmos.hpp
		Gizmos/GizmoType.hpp
		Gizmos/SubrenderGizmos.hpp
		Graphics/Buffers/Buffer.hpp
		Graphics/Buffers/InstanceBuffer.hpp
		Graphics/Buffers/PushHandler.hpp
		Graphics/Buffers/StorageBuffer.hpp
		Graphics/Buffers/StorageHandler.hpp
		Graphics/Buffers/UniformBuffer.hpp
		Graphics/Buffers/UniformHandler.hpp
		Graphics/Commands/CommandBuffer.hpp
		Graphics/Commands/CommandPool.hpp
		Graphics/Descriptors/Descriptor.hpp
		Graphics/Descriptors/DescriptorSet.hpp
		Graphics/Descriptors/DescriptorsHandler.hpp
		Graphics/Graphics.hpp
		Graphics/Images/Image.hpp
		Graphics/Images/Image2d.hpp
		Graphics/Images/Image2dArray.hpp
		Graphics/Images/ImageCube.hpp
		Graphics/Images/ImageDepth.hpp
		Graphics/Pipelines/Pipeline.hpp
		Graphics/Pipelines/PipelineCompute.hpp
		Graphics/Pipelines/PipelineGraphics.hpp
		Graphics/Pipelines/Shader.hpp
		Graphics/Renderer.hpp
		Graphics/Renderpass/Framebuffers.hpp
		Graphics/Renderpass/Renderpass.hpp
		Graphics/Renderpass/Swapchain.hpp
		Graphics/RenderStage.hpp
		Graphics/Subrender.hpp
		Graphics/SubrenderHolder.hpp
		Guis/Gui.hpp
		Guis/SubrenderGuis.hpp
		Helpers/ConstExpr.hpp
		Helpers/Delegate.hpp
		Helpers/EnumClass.hpp
		Helpers/Enumerate.hpp
		Helpers/Factory.hpp
		Helpers/Future.hpp
		Helpers/NonCopyable.hpp
		Helpers/RingBuffer.hpp
		Helpers/StreamFactory.hpp
		Helpers/String.hpp
		Helpers/ThreadPool.hpp
		Helpers/TypeInfo.hpp
		Inputs/Axes/Axis.hpp
		Inputs/Axes/AxisButton.hpp
		Inputs/Axes/AxisCompound.hpp
		Inputs/Axes/AxisJoystick.hpp
		Inputs/Axes/AxisMouse.hpp
		Inputs/Axes/HatJoystick.hpp
		Inputs/Buttons/Button.hpp
		Inputs/Buttons/ButtonAxis.hpp
		Inputs/Buttons/ButtonCompound.hpp
		Inputs/Buttons/ButtonJoystick.hpp
		Inputs/Buttons/ButtonKeyboard.hpp
		Inputs/Buttons/ButtonMouse.hpp
		Inputs/Input.hpp
		Inputs/InputDelay.hpp
		Inputs/InputScheme.hpp
		Lights/Fog.hpp
		Lights/Light.hpp
		Materials/Material.hpp
		Materials/MaterialDefault.hpp
		Materials/PipelineMaterial.hpp
		Maths/Colour.hpp
		Maths/ElapsedTime.hpp
		Maths/Maths.hpp
		Maths/Matrix2.hpp
		Maths/Matrix3.hpp
		Maths/Matrix4.hpp
		Maths/Noise/Noise.hpp
		Maths/Quaternion.hpp
		Maths/Time.hpp
		Maths/Time.inl
		Maths/Transform.hpp
		Maths/Vector2.hpp
		Maths/Vector2.inl
		Maths/Vector3.hpp
		Maths/Vector3.inl
		Maths/Vector4.hpp
		Maths/Vector4.inl
		Meshes/Mesh.hpp
		Meshes/SubrenderMeshes.hpp
		Models/Gltf/ModelGltf.hpp
		Models/Model.hpp
		Models/Model.inl
		Models/Obj/ModelObj.hpp
		Models/Shapes/MeshPattern.hpp
		Models/Shapes/MeshSimple.hpp
		Models/Shapes/ModelCube.hpp
		Models/Shapes/ModelCylinder.hpp
		Models/Shapes/ModelDisk.hpp
		Models/Shapes/ModelRectangle.hpp
		Models/Shapes/ModelSphere.hpp
		Models/Vertex2d.hpp
		Models/Vertex3d.hpp
		Network/Ftp/Ftp.hpp
		Network/Ftp/FtpDataChannel.hpp
		Network/Ftp/FtpResponse.hpp
		Network/Ftp/FtpResponseDirectory.hpp
		Network/Ftp/FtpResponseListing.hpp
		Network/Http/Http.hpp
		Network/Http/HttpRequest.hpp
		Network/Http/HttpResponse.hpp
		Network/IpAddress.hpp
		Network/Packet.hpp
		Network/Socket.hpp
		Network/SocketSelector.hpp
		Network/Tcp/TcpListener.hpp
		Network/Tcp/TcpSocket.hpp
		Network/Udp/UdpSocket.hpp
		Particles/Emitters/Emitter.hpp
		Particles/Emitters/EmitterCircle.hpp
		Particles/Emitters/EmitterLine.hpp
		Particles/Emitters/EmitterPoint.hpp
		Particles/Emitters/EmitterSphere.hpp
		Particles/Particle.hpp
		Particles/Particles.hpp
		Particles/ParticleSystem.hpp
		Particles/ParticleType.hpp
		Particles/SubrenderParticles.hpp
		Physics/Colliders/Collider.hpp
		Physics/Colliders/ColliderCapsule.hpp
		Physics/Colliders/ColliderCone.hpp
		Physics/Colliders/ColliderConvexHull.hpp
		Physics/Colliders/ColliderCube.hpp
		Physics/Colliders/ColliderCylinder.hpp
		Physics/Colliders/ColliderHeightfield.hpp
		Physics/Colliders/ColliderSphere.hpp
		Physics/CollisionObject.hpp
		Physics/Force.hpp
		Physics/Frustum.hpp
		Physics/KinematicCharacter.hpp
		Physics/Ray.hpp
		Physics/Rigidbody.hpp
		Post/Deferred/SubrenderDeferred.hpp
		Post/Filters/FilterBlit.hpp
		Post/Filters/FilterBlur.hpp
		Post/Filters/FilterCrt.hpp
		Post/Filters/FilterDarken.hpp
		Post/Filters/FilterDefault.hpp
		Post/Filters/FilterDof.hpp
		Post/Filters/FilterEmboss.hpp
		Post/Filters/FilterFxaa.hpp
		Post/Filters/FilterGrain.hpp
		Post/Filters/FilterGrey.hpp
		Post/Filters/FilterLensflare.hpp
		Post/Filters/FilterNegative.hpp
		Post/Filters/FilterPixel.hpp
		Post/Filters/FilterSepia.hpp
		Post/Filters/FilterSsao.hpp
		Post/Filters/FilterTiltshift.hpp
		Post/Filters/FilterTone.hpp
		Post/Filters/FilterVignette.hpp
		Post/Filters/FilterWobble.hpp
		Post/Pipelines/PipelineBlur.hpp
		Post/PostFilter.hpp
		Post/PostPipeline.hpp
		Resources/Resource.hpp
		Resources/Resources.hpp
		Scenes/Camera.hpp
		Scenes/Component.hpp
		Scenes/Entity.hpp
		Scenes/EntityPrefab.hpp
		Scenes/Scene.hpp
		Scenes/ScenePhysics.hpp
		Scenes/Scenes.hpp
		Scenes/SceneStructure.hpp
		Shadows/ShadowBox.hpp
		Shadows/ShadowRender.hpp
		Shadows/Shadows.hpp
		Shadows/SubrenderShadows.hpp
		Skyboxes/MaterialSkybox.hpp
		Timers/Timers.hpp
		Uis/Drivers/UiDriver.hpp
		Uis/Drivers/BounceDriver.hpp
		Uis/Drivers/ConstantDriver.hpp
		Uis/Drivers/FadeDriver.hpp
		Uis/Drivers/LinearDriver.hpp
		Uis/Drivers/SinewaveDriver.hpp
		Uis/Drivers/SlideDriver.hpp
		Uis/Inputs/UiInputBoolean.hpp
		Uis/Inputs/UiInputButton.hpp
		Uis/Inputs/UiInputDropdown.hpp
		Uis/Inputs/UiInputGrabber.hpp
		Uis/Inputs/UiInputRadio.hpp
		Uis/Inputs/UiInputSlider.hpp
		Uis/Inputs/UiInputText.hpp
		Uis/UiObject.hpp
		Uis/UiPanel.hpp
		Uis/Uis.hpp
		Uis/UiScrollBar.hpp
		Uis/UiSection.hpp
		Uis/UiStartLogo.hpp
		Uis/UiTransform.hpp
		)
set(_temp_acid_sources
		Animations/Animation/Animation.cpp
		Animations/Animation/AnimationLoader.cpp
		Animations/Animation/JointTransform.cpp
		Animations/Animation/Keyframe.cpp
		Animations/Animator.cpp
		Animations/Geometry/GeometryLoader.cpp
		Animations/MeshAnimated.cpp
		Animations/Skeleton/Joint.cpp
		Animations/Skeleton/SkeletonLoader.cpp
		Animations/Skin/SkinLoader.cpp
		Animations/Skin/VertexWeights.cpp
		Audio/Audio.cpp
		Audio/Flac/SoundBufferFlac.cpp
		Audio/Mp3/SoundBufferMp3.cpp
		Audio/Ogg/SoundBufferOgg.cpp
		Audio/Opus/SoundBufferOpus.cpp
		Audio/Sound.cpp
		Audio/SoundBuffer.cpp
		Audio/Wave/SoundBufferWave.cpp
		Bitmaps/Bitmap.cpp
		Bitmaps/Png/BitmapPng.cpp
		Devices/Instance.cpp
		Devices/Joysticks.cpp
		Devices/Keyboard.cpp
		Devices/LogicalDevice.cpp
		Devices/Monitor.cpp
		Devices/Mouse.cpp
		Devices/PhysicalDevice.cpp
		Devices/Surface.cpp
		Devices/Window.cpp
		Engine/Engine.cpp
		Engine/Log.cpp
		Files/File.cpp
		Files/FileObserver.cpp
		Files/Files.cpp
		Files/Json/Json.cpp
		Files/Node.cpp
		Files/NodeConstView.cpp
		Files/NodeView.cpp
		Files/Xml/Xml.cpp
		Files/Zip/miniz.c
		Files/Zip/ZipArchive.cpp
		Files/Zip/ZipEntry.cpp
		Fonts/FontType.cpp
		Fonts/msdf.c
		Fonts/SubrenderFonts.cpp
		Fonts/Text.cpp
		Gizmos/Gizmo.cpp
		Gizmos/Gizmos.cpp
		Gizmos/GizmoType.cpp
		Gizmos/SubrenderGizmos.cpp
		Graphics/Buffers/Buffer.cpp
		Graphics/Buffers/InstanceBuffer.cpp
		Graphics/Buffers/PushHandler.cpp
		Graphics/Buffers/StorageBuffer.cpp
		Graphics/Buffers/StorageHandler.cpp
		Graphics/Buffers/UniformBuffer.cpp
		Graphics/Buffers/UniformHandler.cpp
		Graphics/Commands/CommandBuffer.cpp
		Graphics/Commands/CommandPool.cpp
		Graphics/Descriptors/DescriptorSet.cpp
		Graphics/Descriptors/DescriptorsHandler.cpp
		Graphics/Graphics.cpp
		Graphics/Images/Image.cpp
		Graphics/Images/Image2d.cpp
		Graphics/Images/Image2dArray.cpp
		Graphics/Images/ImageCube.cpp
		Graphics/Images/ImageDepth.cpp
		Graphics/Pipelines/PipelineCompute.cpp
		Graphics/Pipelines/PipelineGraphics.cpp
		Graphics/Pipelines/Shader.cpp
		Graphics/Renderpass/Framebuffers.cpp
		Graphics/Renderpass/Renderpass.cpp
		Graphics/Renderpass/Swapchain.cpp
		Graphics/RenderStage.cpp
		Graphics/SubrenderHolder.cpp
		Guis/Gui.cpp
		Guis/SubrenderGuis.cpp
		Helpers/String.cpp
		Helpers/ThreadPool.cpp
		Inputs/Axes/AxisButton.cpp
		Inputs/Axes/AxisCompound.cpp
		Inputs/Axes/AxisJoystick.cpp
		Inputs/Axes/AxisMouse.cpp
		Inputs/Axes/HatJoystick.cpp
		Inputs/Buttons/ButtonAxis.cpp
		Inputs/Buttons/ButtonCompound.cpp
		Inputs/Buttons/ButtonJoystick.cpp
		Inputs/Buttons/ButtonKeyboard.cpp
		Inputs/Buttons/ButtonMouse.cpp
		Inputs/Input.cpp
		Inputs/InputDelay.cpp
		Inputs/InputScheme.cpp
		Lights/Fog.cpp
		Lights/Light.cpp
		Materials/MaterialDefault.cpp
		Materials/PipelineMaterial.cpp
		Maths/Colour.cpp
		Maths/ElapsedTime.cpp
		Maths/Maths.cpp
		Maths/Matrix2.cpp
		Maths/Matrix3.cpp
		Maths/Matrix4.cpp
		Maths/Noise/Noise.cpp
		Maths/Quaternion.cpp
		Maths/Transform.cpp
		Maths/Vector2.cpp
		Maths/Vector3.cpp
		Maths/Vector4.cpp
		Meshes/Mesh.cpp
		Meshes/SubrenderMeshes.cpp
		Models/Gltf/ModelGltf.cpp
		Models/Model.cpp
		Models/Obj/ModelObj.cpp
		Models/Shapes/MeshPattern.cpp
		Models/Shapes/MeshSimple.cpp
		Models/Shapes/ModelCube.cpp
		Models/Shapes/ModelCylinder.cpp
		Models/Shapes/ModelDisk.cpp
		Models/Shapes/ModelRectangle.cpp
		Models/Shapes/ModelSphere.cpp
		Network/Ftp/Ftp.cpp
		Network/Ftp/FtpDataChannel.cpp
		Network/Ftp/FtpResponse.cpp
		Network/Ftp/FtpResponseDirectory.cpp
		Network/Ftp/FtpResponseListing.cpp
		Network/Http/Http.cpp
		Network/Http/HttpRequest.cpp
		Network/Http/HttpResponse.cpp
		Network/IpAddress.cpp
		Network/Packet.cpp
		Network/Socket.cpp
		Network/SocketSelector.cpp
		Network/Tcp/TcpListener.cpp
		Network/Tcp/TcpSocket.cpp
		Network/Udp/UdpSocket.cpp
		Particles/Emitters/EmitterCircle.cpp
		Particles/Emitters/EmitterLine.cpp
		Particles/Emitters/EmitterPoint.cpp
		Particles/Emitters/EmitterSphere.cpp
		Particles/Particle.cpp
		Particles/Particles.cpp
		Particles/ParticleSystem.cpp
		Particles/ParticleType.cpp
		Particles/SubrenderParticles.cpp
		Physics/Colliders/Collider.cpp
		Physics/Colliders/ColliderCapsule.cpp
		Physics/Colliders/ColliderCone.cpp
		Physics/Colliders/ColliderConvexHull.cpp
		Physics/Colliders/ColliderCube.cpp
		Physics/Colliders/ColliderCylinder.cpp
		Physics/Colliders/ColliderHeightfield.cpp
		Physics/Colliders/ColliderSphere.cpp
		Physics/CollisionObject.cpp
		Physics/Force.cpp
		Physics/Frustum.cpp
		Physics/KinematicCharacter.cpp
		Physics/Ray.cpp
		Physics/Rigidbody.cpp
		Post/Deferred/SubrenderDeferred.cpp
		Post/Filters/FilterBlit.cpp
		Post/Filters/FilterBlur.cpp
		Post/Filters/FilterCrt.cpp
		Post/Filters/FilterDarken.cpp
		Post/Filters/FilterDefault.cpp
		Post/Filters/FilterDof.cpp
		Post/Filters/FilterEmboss.cpp
		Post/Filters/FilterFxaa.cpp
		Post/Filters/FilterGrain.cpp
		Post/Filters/FilterGrey.cpp
		Post/Filters/FilterLensflare.cpp
		Post/Filters/FilterNegative.cpp
		Post/Filters/FilterPixel.cpp
		Post/Filters/FilterSepia.cpp
		Post/Filters/FilterSsao.cpp
		Post/Filters/FilterTiltshift.cpp
		Post/Filters/FilterTone.cpp
		Post/Filters/FilterVignette.cpp
		Post/Filters/FilterWobble.cpp
		Post/Pipelines/PipelineBlur.cpp
		Post/PostFilter.cpp
		Resources/Resources.cpp
		Scenes/Entity.cpp
		Scenes/EntityPrefab.cpp
		Scenes/ScenePhysics.cpp
		Scenes/Scenes.cpp
		Scenes/SceneStructure.cpp
		Shadows/ShadowBox.cpp
		Shadows/ShadowRender.cpp
		Shadows/Shadows.cpp
		Shadows/SubrenderShadows.cpp
		Skyboxes/MaterialSkybox.cpp
		Timers/Timers.cpp
		Uis/Inputs/UiInputBoolean.cpp
		Uis/Inputs/UiInputButton.cpp
		Uis/Inputs/UiInputDropdown.cpp
		Uis/Inputs/UiInputGrabber.cpp
		Uis/Inputs/UiInputRadio.cpp
		Uis/Inputs/UiInputSlider.cpp
		Uis/Inputs/UiInputText.cpp
		Uis/UiObject.cpp
		Uis/UiPanel.cpp
		Uis/Uis.cpp
		Uis/UiScrollBar.cpp
		Uis/UiSection.cpp
		Uis/UiStartLogo.cpp
		Uis/UiTransform.cpp
		)
		
get_filename_component(CURRENT_PARENT_DIR ${CMAKE_CURRENT_SOURCE_DIR} PATH)
if(ACID_LINK_RESOURCES)
	# Directory that Acid resources can be found.
	set(ACID_RESOURCES_DIR "${CURRENT_PARENT_DIR}/Resources")
endif()
if(ACID_INSTALL_RESOURCES)
	# Install resources for end-user usage because many source files use these
	install(DIRECTORY "${CURRENT_PARENT_DIR}/Resources"
			# Example: this will install the Resources dir to /usr/share/Acid/Resources on Linux
			DESTINATION "${CMAKE_INSTALL_DATADIR}/${PROJECT_NAME}"
			)
endif()

# Generates a header containing export macros
include(GenerateExportHeader)
generate_export_header(Acid EXPORT_FILE_NAME "${CMAKE_CURRENT_BINARY_DIR}/Export.hpp")

# Adds a CMake generated config file
configure_file(Config.hpp.in "${CMAKE_CURRENT_BINARY_DIR}/Config.hpp" @ONLY)

# Sets all headers as PUBLIC sources for Acid
# The BUILD/INSTALL interface generator expressions are for the EXPORT command
# Otherwise it wouldn't know where to look for them
foreach(_acid_header IN LISTS _temp_acid_headers)
	target_sources(Acid PRIVATE
			$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/${_acid_header}>
			$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/${_acid_header}>
			)
endforeach()
# Sets all sources (cpp) as PRIVATE sources for Acid
# An INSTALL_INTERFACE isn't needed, as cpp files aren't installed
foreach(_acid_source IN LISTS _temp_acid_sources)
	target_sources(Acid PRIVATE
			$<BUILD_INTERFACE:${_acid_source}>
			)
endforeach()

# Changes how sources appear in IDE virtual file structures.
include(AcidGroupSources)
acid_group_sources("${CMAKE_CURRENT_SOURCE_DIR}" "/" "" "${_temp_acid_headers}")
acid_group_sources("${CMAKE_CURRENT_SOURCE_DIR}" "/" "" "${_temp_acid_sources}")

# Include this file in our project view.
target_sources(Acid PRIVATE
		$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/CMakeSources.cmake>
		)
