cmake_minimum_required(VERSION 3.21)

project(EdgeWeightGPS VERSION 0.1.0 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

add_library(EdgeWeightGPS SHARED src/Main.cpp)
target_include_directories(
  EdgeWeightGPS
  PRIVATE
    "${CMAKE_CURRENT_LIST_DIR}/include"
    "${CMAKE_CURRENT_LIST_DIR}/../../vendor/RED4ext.SDK/include"
)
target_compile_definitions(EdgeWeightGPS PRIVATE WIN32_LEAN_AND_MEAN NOMINMAX)
target_compile_options(EdgeWeightGPS PRIVATE -fmax-errors=12)
target_link_options(EdgeWeightGPS PRIVATE -static -static-libgcc -static-libstdc++)

set_target_properties(
  EdgeWeightGPS
  PROPERTIES
    PREFIX ""
    OUTPUT_NAME "EdgeWeightGPS"
)
