cmake_minimum_required (VERSION 3.14)

# Project pif
project(pif VERSION 0.1.0 LANGUAGES CXX)

# Ensure a build type is set properly
if(NOT CMAKE_BUILD_TYPE)
  set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type (Release, Debug, etc.)" FORCE)
endif()


# Locate and collect dependencies
find_package(otcsdk REQUIRED)

# Create an executable named pif
add_executable(pif)

# Specify the source files
target_sources(
  pif
    PRIVATE
      src/main.cpp
      src/SimpleImagerClientPif.cpp
)

# Specifies the include directories
target_include_directories(
  pif
    PRIVATE
      src
)

# Specifies the libraries to link against
target_link_libraries( 
  pif
    PRIVATE
      otcsdk::otcsdk
)

# Adjust the target output directories
set_target_properties(pif
   PROPERTIES
    ARCHIVE_OUTPUT_DIRECTORY "$<1:${CMAKE_CURRENT_BINARY_DIR}>"
    LIBRARY_OUTPUT_DIRECTORY "$<1:${CMAKE_CURRENT_BINARY_DIR}>"
    RUNTIME_OUTPUT_DIRECTORY "$<1:${CMAKE_CURRENT_BINARY_DIR}>"
    PDB_OUTPUT_DIRECTORY     "$<1:${CMAKE_CURRENT_BINARY_DIR}>"
)