Skip to content

Commit 6aede52

Browse files
committed
Use exact same setup as nanonbind example
1 parent 231ed56 commit 6aede52

File tree

1 file changed

+6
-23
lines changed

1 file changed

+6
-23
lines changed

CMakeLists.txt

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,13 @@
1-
cmake_minimum_required(VERSION 3.15...3.29)
1+
cmake_minimum_required(VERSION 3.15...3.27)
22
project(mapbox_earcut LANGUAGES CXX)
33

4-
if (NOT SKBUILD)
5-
message(WARNING "\
6-
This CMake file is meant to be executed using 'scikit-build-core'.
7-
Running it directly will almost certainly not produce the desired
8-
result. If you are a user trying to install this package, use the
9-
command below, which will install all necessary build dependencies,
10-
compile the package in an isolated environment, and then install it.
11-
=====================================================================
12-
$ uv sync
13-
=====================================================================
14-
If you are a software developer, and this is your own package, then
15-
it is usually much more efficient to install the build dependencies
16-
in your environment once and use the following command that avoids
17-
a costly creation of a new virtual environment at every compilation:
18-
=====================================================================
19-
$ uv build
20-
=====================================================================
21-
You may optionally add -Ceditable.rebuild=true to auto-rebuild when
22-
the package is imported. Otherwise, you need to rerun the above
23-
after editing C++ files.")
4+
if(CMAKE_VERSION VERSION_LESS 3.18)
5+
set(DEV_MODULE Development)
6+
else()
7+
set(DEV_MODULE Development.Module)
248
endif()
259

26-
find_package(Python COMPONENTS Interpreter Development
27-
REQUIRED)
10+
find_package(Python COMPONENTS Interpreter ${DEV_MODULE} REQUIRED)
2811
execute_process(
2912
COMMAND "${Python_EXECUTABLE}" -m nanobind --cmake_dir
3013
OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE nanobind_ROOT)

0 commit comments

Comments
 (0)