project(benchmark)

if(MML_GENERATE_GUI)
    # List of Qt modules that are required in CamiTK
    set(CAMITK_QT_COMPONENTS Core Gui Widgets Xml UiTools)
    # list of namespace prefixed to use in target_link_libraries
    string(REGEX REPLACE "([^;]+)" "Qt::\\1" CAMITK_QT_LIBRARIES "${CAMITK_QT_COMPONENTS}")
    # Find Qt6
    find_package(Qt6 COMPONENTS ${CAMITK_QT_COMPONENTS} QUIET)
    if (NOT Qt6_FOUND)
        # Find Qt5
        find_package(Qt5 5.15 COMPONENTS ${CAMITK_QT_COMPONENTS} REQUIRED)
        if (NOT Qt5_FOUND)
            message(SEND_ERROR "Modeling application benchmark: Failed to find Qt 5.x/6.x. This is needed by ${LIBRARY_TARGET_NAME}.")
        endif()
    endif()
    message(STATUS "Modeling application benchmark: found Qt ${Qt_VERSION}.")
    add_definitions(-DMML_GENERATE_GUI)
endif()

set(HEADERS
)

set(SRCS
  benchmark.cpp
  ${HEADERS}
)

include_directories(${MML_INCLUDE_DIRECTORIES})
link_directories(${MML_LINK_DIRECTORIES})
add_executable(benchmark ${SRCS})
target_link_libraries(benchmark ${CAMITK_QT_LIBRARIES} ${MML_DEPENDENCY})
add_dependencies(benchmark ${MONITORING_DEPENDENCY})

