[Feature] Improve uri handling.
[Khopper.git] / plugins / CMakeLists.txt
blob716715a7ba696006fdb6a44475170a827bc340e5
1 # plugins
3 if(MSVC)
4     set(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/plugins")
5 else()
6     set(LIBRARY_OUTPUT_PATH "${CMAKE_BINARY_DIR}/lib/plugins")
7 endif()
9 include_directories("${CMAKE_SOURCE_DIR}/core/include")
11 macro(KHOPPER_ADD_PLUGIN target)
12     add_definitions(${QT_DEFINITIONS} -DQT_PLUGIN -DQT_SHARED)
13     add_definitions(-DKHOPPER_PLUGIN_ID=${target})
14     add_dependencies(${target} libkhopper)
15     target_link_libraries(${target} libkhopper)
16     set_target_properties(${target} PROPERTIES VERSION ${KHOPPER_VERSION} SOVERSION ${KHOPPER_VERSION})
17     install(TARGETS ${target}
18         RUNTIME DESTINATION "plugins"
19         LIBRARY DESTINATION "lib/khopper/plugins")
20 endmacro()
22 add_subdirectory(cuesheet)
24 find_package(FFmpeg)
25 if(FFMPEG_FOUND)
26     list(APPEND KHOPPER_OPTIONAL_FOUND "Found libav*, FFmpeg plugin will be build.")
27     add_subdirectory(ffmpeg)
28 else()
29     list(APPEND KHOPPER_OPTIONAL_NOT_FOUND "libav* for FFmpeg plugin")
30 endif()
32 find_package(Mp3Lame)
33 find_package(TagLib)
34 if(MP3LAME_FOUND AND TAGLIB_FOUND)
35     list(APPEND KHOPPER_OPTIONAL_FOUND "Found libmp3lame and TagLib, mp3Lame plugin will be build.")
36     add_subdirectory(mp3lame)
37 else()
38     if(NOT MP3LAME_FOUND)
39         list(APPEND KHOPPER_OPTIONAL_NOT_FOUND "libmp3lame for mp3Lame plugin")
40     endif()
41     if(NOT TAGLIB_FOUND)
42         list(APPEND KHOPPER_OPTIONAL_NOT_FOUND "TagLib for mp3Lame plugin")
43     endif()
44 endif()
46 add_subdirectory(redbook)
48 add_subdirectory(single)
50 find_package(Flac)
51 find_package(OggVorbis)
52 if(FLAC_FOUND AND OGGVORBIS_FOUND)
53     list(APPEND KHOPPER_OPTIONAL_FOUND "Found libFLAC and OggVorbis, Xiph plugin will be build.")
54     add_subdirectory(xiph)
55 else()
56     if(NOT FLAC_FOUND)
57         list(APPEND KHOPPER_OPTIONAL_NOT_FOUND "libFLAC for Xiph plugin")
58     endif()
59     if(NOT OGGVORBIS_FOUND)
60         list(APPEND KHOPPER_OPTIONAL_NOT_FOUND "OggVorbis for Xiph plugin")
61     endif()
62 endif()
64 set(KHOPPER_OPTIONAL_FOUND ${KHOPPER_OPTIONAL_FOUND} PARENT_SCOPE)
65 set(KHOPPER_OPTIONAL_NOT_FOUND ${KHOPPER_OPTIONAL_NOT_FOUND} PARENT_SCOPE)