#
# Copyright (C) 2022-2023 David Hampton
#
# See the file LICENSE_FSF for licensing information.
#

#
# This script is always processed.
#

set(PYFILES
  azlyrics.py
  darklyrics.py
  embedlrc.py
  filelyrics.py
  genius.py
  lrclib.py
  lyricscom.py
  lyricsmode.py
  megalobiz.py
  music163.py
  musixmatchlrc.py
  musixmatch.py
  rclyricsband.py
  supermusic.py)

#
# The cmake documentation strongly recommands against globbing source file
# names, thus this explicit list of filenames.
#
unset(PROCESSED_FILES)
fix_shebang_install_python("metadata/Music/lyrics" PYFILES)

# This custom target dependes on all of the files generated by the
# fix_shebang_install_python macro, which is what causes those commands to
# actually be executed.
add_custom_target(metadata_Music_lyrics ALL DEPENDS ${PROCESSED_FILES})

#
# The remaining files can be easily installed without any processing
#
install(FILES README
        DESTINATION ${CMAKE_INSTALL_DATADIR}/mythtv/metadata/Music/lyrics)
install(
  DIRECTORY common examples lib Kodistubs
  DESTINATION ${CMAKE_INSTALL_DATADIR}/mythtv/metadata/Music/lyrics
  PATTERN "\.gitignore" EXCLUDE)
