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

#
# This script is not processed unless USING_BINDINGS_PYTHON is set.
#
if(NOT USING_BINDINGS_PYTHON)
  return()
endif()

#
# The cmake documentation strongly recommands against globbing source file
# names, thus this explicit list of filenames.
#
set(PYFILES tmdb3tv.py ttvdb4.py tvmaze.py)

unset(PROCESSED_FILES)
fix_shebang_install_python("metadata/Television" 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_Television ALL DEPENDS ${PROCESSED_FILES})

#
# The non-python files can be easily installed without any processing
#
install(FILES ttvdb4_doctests ttvdb4.ini tvdb_test.conf tvmaze_tests.txt
        DESTINATION ${CMAKE_INSTALL_DATADIR}/mythtv/metadata/Television)
