cmake_minimum_required(VERSION 3.30)

project(itcpc LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)


file(GLOB ITCPC_SRC
     "*.h"
     "*.cpp"
     "../shared/platform_defines.h"
     "../shared/getopt.cpp"
     "../shared/getopt.h"
)


add_executable(itcpc ${ITCPC_SRC})

target_compile_features(itcpc
    PUBLIC
        cxx_std_20
)

target_precompile_headers(itcpc
    PRIVATE
        ${CMAKE_CURRENT_SOURCE_DIR}/pch.h
)

target_include_directories(itcpc
     PRIVATE
          ${CMAKE_SOURCE_DIR}
          ${CMAKE_SOURCE_DIR}/../shared
)

set(dir ${CMAKE_SOURCE_DIR}/../temp/itcpc)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${dir})
set(CMAKE_BUILD_FILES_DIRECTORY ${dir})
set(CMAKE_BUILD_DIRECTORY ${dir})
set(dir1 ${CMAKE_SOURCE_DIR}/../out)
SET(EXECUTABLE_OUTPUT_PATH ${dir1}/tools)
SET(CMAKE_INSTALL_PREFIX ${dir1})

install(TARGETS itcpc RUNTIME DESTINATION tools)
