# This file was generated by the YaTool build system (https://github.com/yandex/yatool),
# from a source YaTool build configuration provided in ya.make files.
#
# If the repository supports both CMake and ya build configurations, please modify both of them.
#
# If only CMake build configuration is supported then modify only CMake files and note that only
# simple modifications are allowed like adding source-files to targets or adding simple properties
# like target_include_directories. These modifications will be ported to original ya.make files
# by maintainers. Any complex modifications which can't be easily ported back to the ya build
# system may be rejected.
#
# Please refer to the build instructions in the repository for more information about manual
# changes in this file.

find_package(Python3 REQUIRED)

set(KOSHER_SVN_VERSION )

set(SANDBOX_TASK_ID 0)

set(BUILD_TYPE $<CONFIGURATION>)

add_library(library-cpp-build_info)


target_include_directories(library-cpp-build_info PUBLIC
  ${PROJECT_BINARY_DIR}/library/cpp/build_info
)

target_link_libraries(library-cpp-build_info PUBLIC
  contrib-libs-linux-headers
  contrib-libs-cxxsupp
  yutil
  cpp-string_utils-base64
)

target_sources(library-cpp-build_info PRIVATE
  ${PROJECT_SOURCE_DIR}/library/cpp/build_info/build_info_static.cpp
  ${PROJECT_BINARY_DIR}/library/cpp/build_info/sandbox.cpp
  ${PROJECT_BINARY_DIR}/library/cpp/build_info/build_info.cpp
  ${PROJECT_BINARY_DIR}/library/cpp/build_info/buildinfo_data.h
)


configure_file(
  ${PROJECT_SOURCE_DIR}/library/cpp/build_info/sandbox.cpp.in
  ${PROJECT_BINARY_DIR}/library/cpp/build_info/sandbox.cpp
)

configure_file(
  ${PROJECT_SOURCE_DIR}/library/cpp/build_info/build_info.cpp.in
  ${PROJECT_BINARY_DIR}/library/cpp/build_info/build_info.cpp
)

add_custom_command(
  OUTPUT
  ${PROJECT_BINARY_DIR}/library/cpp/build_info/buildinfo_data.h
  DEPENDS
  ${PROJECT_SOURCE_DIR}/build/scripts/build_info_gen.py
  COMMAND
  Python3::Interpreter
  ${PROJECT_SOURCE_DIR}/build/scripts/build_info_gen.py
  ${PROJECT_BINARY_DIR}/library/cpp/build_info/buildinfo_data.h
  \"${CMAKE_CXX_COMPILER}\"
  \"${CMAKE_CXX_FLAGS}\"
)
