project(sayonara-test)

include(${CMAKE_SOURCE_DIR}/cmake/Packages.cmake)
include(${CMAKE_SOURCE_DIR}/cmake/NewTest.cmake)

if(POLICY CMP0071)
	cmake_policy(SET CMP0071 NEW)
endif()

set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)

file(COPY ${CMAKE_SOURCE_DIR}/resources/player.db
	DESTINATION	${CMAKE_CURRENT_BINARY_DIR}
)

include_directories(${CMAKE_SOURCE_DIR}/src)
include_directories(${CMAKE_BINARY_DIR}/src)
include_directories(${CMAKE_BINARY_DIR}/src/3rdParty)
include_directories(${CMAKE_BINARY_DIR}/src/3rdParty/taglib)

include_directories(${CMAKE_SOURCE_DIR})
include_directories(${CMAKE_BINARY_DIR}/test)

pkg_check_modules(GSTREAMER_AUDIO gstreamer-audio-1.0 REQUIRED)
include_directories(${GSTREAMER_AUDIO_INCLUDE_DIRS})

set(RESOURCES
	resources/Test.qrc
	${CMAKE_CURRENT_SOURCE_DIR}/../resources/Database.qrc
	${CMAKE_CURRENT_SOURCE_DIR}/../resources/Resources.qrc
)

qt5_add_resources(RESOURCES_RCC
	${RESOURCES}
)

new_test(AudioConverter/AudioConverterTest.cpp)
new_test(Bookmarks/BookmarkStorageTest.cpp)
new_test(Common/FileSystemMockTest.cpp)
new_test(Common/LibraryDatabaseProviderTest.cpp)
new_test(Covers/AudioscrobblerTest.cpp)
new_test(Covers/CoverFetchManagerTest.cpp)
new_test(Covers/CoverLocationTest.cpp)
new_test(Database/AlbumTest.cpp)
new_test(Database/ArtistTest.cpp)
new_test(Database/BasicQueryTest.cpp)
new_test(Database/FixesTest.cpp)
new_test(Database/LibraryDatabaseTest.cpp)
new_test(Database/PlaylistDatabaseTest.cpp)
new_test(Database/PodcastTest.cpp)
new_test(Database/TracksTest.cpp Common/TestTracks.cpp)
new_test(Directories/DirectorySelectionHandlerTest.cpp)
new_test(DynamicPlayback/ArtistMatchTest.cpp)
new_test(DynamicPlayback/DynamicPlaybackHandlerTest.cpp)
new_test(DynamicPlayback/LfmSimilarArtistFetcherTest.cpp)
new_test(DynamicPlayback/LfmSimilarArtistParserTest.cpp)
new_test(Engine/BroadcastTest.cpp)
new_test(Engine/CallbackTest.cpp)
new_test(Engine/EngineUtilsTest.cpp)
new_test(Equalizer/EqualizerTest.cpp)
new_test(History/HistoryTest.cpp Common/TestTracks.cpp)
new_test(LastFm/ScrobbleTest.cpp)
new_test(Library/CacheThreadTest.cpp)
new_test(Library/CopyThreadTest.cpp)
new_test(Library/GenreFetcherTest.cpp)
new_test(Library/GenreTreeBuilderTest.cpp)
new_test(Library/ImportCacheTest.cpp)
new_test(Library/LibraryImporterTest.cpp)
new_test(Library/LibraryManagerTest.cpp)
new_test(Library/LocalLibraryTest.cpp)
new_test(Library/ReloadThreadTest.cpp Common/TestTracks.cpp)
new_test(LibraryManagement/LibraryPluginHandlerTest.cpp)
new_test(Lyrics/LyricsLogicTest.cpp)
new_test(Lyrics/LyricsServerProviderTest.cpp)
new_test(PlayManager/PlayManagerTest.cpp)
new_test(Playlist/LibraryPlaylistInteractorTest.cpp)
new_test(Playlist/LocalPathPlaylistCreatorTest.cpp Playlist/PlaylistTestUtils.cpp Common/TestTracks.cpp)
new_test(Playlist/LocalPathProcessorTest.cpp Playlist/PlaylistTestUtils.cpp Common/TestTracks.cpp)
new_test(Playlist/PlaylistDbInterfaceTest.cpp Common/TestTracks.cpp)
new_test(Playlist/PlaylistFileTest.cpp Playlist/PlaylistTestUtils.cpp Common/TestTracks.cpp)
new_test(Playlist/PlaylistHandlerTest.cpp Common/TestTracks.cpp)
new_test(Playlist/PlaylistLoaderTest.cpp)
new_test(Playlist/PlaylistShuffleTest.cpp Playlist/PlaylistTestUtils.cpp Common/TestTracks.cpp)
new_test(Playlist/PlaylistTest.cpp Playlist/PlaylistTestUtils.cpp Common/TestTracks.cpp)
new_test(Playlist/PlaylistTrackModifyTest.cpp Playlist/PlaylistTestUtils.cpp Common/TestTracks.cpp)
new_test(Playlist/RepeatTest.cpp Playlist/PlaylistTestUtils.cpp Common/TestTracks.cpp)
new_test(Playlist/StopBehaviorTest.cpp)
new_test(Settings/SettingConverterTest.cpp)
new_test(Settings/SettingsNotifierTest.cpp)
new_test(SmartPlaylists/ConverterTest.cpp)
new_test(SmartPlaylists/ListeningDateTest.cpp)
new_test(SmartPlaylists/SmartPlaylistManagerTest.cpp)
new_test(StreamRecorder/StreamRecorderTest.cpp)
new_test(StreamRecorder/StreamRecorderUtilsTest.cpp)
new_test(Streaming/RadioBrowserParserTest.cpp)
new_test(Streaming/RadioStationParserTest.cpp)
new_test(Streaming/StreamHandlerTest.cpp)
new_test(Tagging/AlbumArtistTest.cpp Tagging/AbstractTaggingTest.cpp)
new_test(Tagging/CoverEditTest.cpp Common/TestTracks.cpp)
new_test(Tagging/CoverTest.cpp Tagging/AbstractTaggingTest.cpp)
new_test(Tagging/DiscnumberTest.cpp Tagging/AbstractTaggingTest.cpp)
new_test(Tagging/EditorTest.cpp)
new_test(Tagging/LyricsTest.cpp Tagging/AbstractTaggingTest.cpp)
new_test(Tagging/RatingTest.cpp Tagging/AbstractTaggingTest.cpp)
new_test(Tagging/TagFromPathTest.cpp)
new_test(Tagging/TaggingTest.cpp)
new_test(Util/ASXParserTest.cpp)
new_test(Util/AlbumClassTest.cpp)
new_test(Util/AsyncWebAccessTest.cpp)
new_test(Util/CissearchTest.cpp)
new_test(Util/CryptTest.cpp)
new_test(Util/DirectoryReaderTest.cpp Common/TestTracks.cpp)
new_test(Util/FileHelperTest.cpp)
new_test(Util/LanguageKeyTest.cpp)
new_test(Util/LanguageUtilTest.cpp)
new_test(Util/LibraryFilterTest.cpp)
new_test(Util/M3UParserTest.cpp)
new_test(Util/MetaDataListTest.cpp)
new_test(Util/MetaDataSortingTest.cpp)
new_test(Util/MetaDataTest.cpp)
new_test(Util/MimeDataTest.cpp ${CMAKE_SOURCE_DIR}/src/Gui/Utils/MimeData/CustomMimeData.cpp)
new_test(Util/PlaylistModeTest.cpp)
new_test(Util/PlsParserTest.cpp)
new_test(Util/PodcastParserTest.cpp)
new_test(Util/Ranges.cpp)
new_test(Util/SetTest.cpp)
new_test(Util/SettingsTest.cpp)
new_test(Util/SortingTest.cpp)
new_test(Util/StandardPathTest.cpp)
new_test(Util/StreamParserTest.cpp)
new_test(Util/TreeTest.cpp)
new_test(Util/UtilTest.cpp)
