set(CMD_NAME "videostitch-cmd")
add_executable(${CMD_NAME} videostitch-cmd.cpp ../common/cmdUtils.cpp)

set_property(TARGET ${CMD_NAME} PROPERTY CXX_STANDARD 14)
include_lib_vs_headers(${CMD_NAME})
include_discovery_vs_headers(${CMD_NAME})
link_target_to_libvideostitch(${CMD_NAME})

if(LINUX)
  find_library(GLFW glfw REQUIRED)
elseif(APPLE)
  find_library(GLFW glfw HINTS "${CMAKE_EXTERNAL_LIB}/glfw" REQUIRED)
  if(MACPORTS)
    target_include_directories(${CMD_NAME} PRIVATE /opt/local/include)
  else()
    target_include_directories(${CMD_NAME} PRIVATE /usr/local/include)
  endif()
elseif(WINDOWS)
  find_library(GLFW glfw3dll REQUIRED)
endif()

target_link_libraries(${CMD_NAME} PRIVATE ${VS_DISCOVERY} ${GLFW})
add_cppcheck(${CMD_NAME} VS)