cmake_minimum_required(VERSION 3.18)
project(refpot LANGUAGES CXX)
if(NOT UNIX)
  message(FATAL_ERROR "RefPot currently requires POSIX macOS or Linux")
endif()
set(PYBIND11_FINDPYTHON ON)
find_package(Python COMPONENTS Interpreter Development.Module REQUIRED)
find_package(pybind11 CONFIG REQUIRED)
pybind11_add_module(_core native/core.cpp)
target_compile_features(_core PRIVATE cxx_std_17)
install(TARGETS _core DESTINATION refpot)
pybind11_add_module(_sql native/relational_bindings.cpp)
target_compile_features(_sql PRIVATE cxx_std_17)
find_package(Threads REQUIRED)
target_link_libraries(_sql PRIVATE Threads::Threads)
install(TARGETS _sql DESTINATION refpot)
