# Copyright 2025 Digitalwerk GmbH.
#
#     This Source Code Form is subject to the terms of the Mozilla
#     Public License, v. 2.0. If a copy of the MPL was not distributed
#     with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
#
# If it is not possible or desirable to put the notice in a particular file, then
# You may include the notice in a location (such as a LICENSE file in a
# relevant directory) where a recipient would be likely to look for such a notice.
#
# You may add additional accurate notices of copyright ownership.
find_package(adtf_sdk 3.21 REQUIRED COMPONENTS adtf_file adtfdat_processing)

add_library(python_processor MODULE
    adtf_file_python_processor.cpp
)

target_link_libraries(python_processor PRIVATE adtfdat_processing pybind11::embed)

set_target_properties(python_processor PROPERTIES
    PREFIX ""
    SUFFIX ".adtffileplugin"
    DEFINE_SYMBOL ""
    DEBUG_POSTFIX "d"
    FOLDER examples
)

target_compile_options(python_processor PRIVATE $<$<CXX_COMPILER_ID:GNU>:-Bsymbolic>)
target_compile_definitions(python_processor PUBLIC BUILD_VERSION="${BUILD_VERSION}")

if (WIN32)
    dw_install_target(TARGET python_processor INSTALL_DIRECTORY adtf_file_python_processor)
else ()
    install(TARGETS python_processor DESTINATION adtf_file_python_processor)
endif ()

