cmake_minimum_required(VERSION 3.18)
project(fastpgv LANGUAGES CXX)
set(PYBIND11_FINDPYTHON ON)
find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
find_package(pybind11 CONFIG REQUIRED)
find_package(Threads REQUIRED)
pybind11_add_module(_native cpp/bindings.cpp cpp/sled.cpp)
target_link_libraries(_native PRIVATE Threads::Threads)
target_compile_features(_native PRIVATE cxx_std_17)
if(MSVC)
  target_compile_options(_native PRIVATE /W4 /fp:precise)
else()
  target_compile_options(_native PRIVATE -Wall -Wextra -Wpedantic)
endif()
install(TARGETS _native LIBRARY DESTINATION fastpgv RUNTIME DESTINATION fastpgv)
