PROJECT( zypp-media-chksum C CXX )

set (CMAKE_CXX_STANDARD 20)
SET (CMAKE_CXX_EXTENSIONS OFF)

SET( SOURCES
  main.cc
)

if ( ZYPP_CXX_CLANG_TIDY OR ZYPP_CXX_CPPCHECK )
  if (ZYPP_CXX_CLANG_TIDY)
    set( CMAKE_CXX_CLANG_TIDY ${ZYPP_CXX_CLANG_TIDY} )
  endif(ZYPP_CXX_CLANG_TIDY)

  if (ZYPP_CXX_CPPCHECK)
    set(CMAKE_CXX_CPPCHECK ${ZYPP_CXX_CPPCHECK})
  endif(ZYPP_CXX_CPPCHECK)
endif( ZYPP_CXX_CLANG_TIDY OR ZYPP_CXX_CPPCHECK )

add_executable( ${PROJECT_NAME} ${SOURCES} )
target_link_libraries( ${PROJECT_NAME} zyppng_exe_compiler_flags )
target_link_libraries( ${PROJECT_NAME} zyppng-media )
target_link_libraries( ${PROJECT_NAME} zyppng-core )

IF ( INSTALL_NG_BINARIES )
  INSTALL( TARGETS ${PROJECT_NAME} DESTINATION "${ZYPPNG_LIBEXEC_INSTALL_DIR}/workers" )
ENDIF()

set_target_properties( ${PROJECT_NAME}
    PROPERTIES
    ARCHIVE_OUTPUT_DIRECTORY "${ZYPPNG_WORKER_BINARY_DIR}"
    LIBRARY_OUTPUT_DIRECTORY "${ZYPPNG_WORKER_BINARY_DIR}"
    RUNTIME_OUTPUT_DIRECTORY "${ZYPPNG_WORKER_BINARY_DIR}"
)
