use scikit_build_core as build system

This commit is contained in:
vls committed 2026-06-01 14:02:34 +02:00
1 parent 5221d6721e
commit cc7ae6d49a
7 files changed
+75 -57

No files matched your search

+4 -6
View File
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 4.0)
project(autoopt)
project(slopefit)
set(CMAKE_CXX_STANDARD 23)
@@ -15,17 +15,15 @@ execute_process(
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE nanobind_ROOT)
find_package(nanobind CONFIG REQUIRED)
file(GLOB_RECURSE SOURCES src/*.cpp)
file(GLOB_RECURSE SOURCES lib/*.cpp)
add_library(autoopt STATIC ${SOURCES})
target_include_directories(autoopt PUBLIC include)
target_link_libraries(autoopt PUBLIC Eigen3::Eigen)
install(DIRECTORY include/autoopt DESTINATION include)
nanobind_add_module(slopefit NOMINSIZE pysrc/module.cpp)
nanobind_add_module(slopefit NOMINSIZE src/module.cpp)
target_link_libraries(slopefit PRIVATE autoopt)
install(TARGETS slopefit DESTINATION lib/python3.13/site-packages)
install(TARGETS slopefit DESTINATION slopefit)
# add tests if gtest is found
find_library(GTestPackage gtest QUIET)