forked from skander-krid/hillmapper
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
25 lines (21 loc) · 750 Bytes
/
CMakeLists.txt
File metadata and controls
25 lines (21 loc) · 750 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
cmake_minimum_required(VERSION 3.15)
project(hillmapper LANGUAGES CXX)
# Require C++17
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
# Fetch pybind11 automatically
include(FetchContent)
FetchContent_Declare(
pybind11
URL https://github.com/pybind/pybind11/archive/refs/tags/v3.0.0.tar.gz
)
FetchContent_MakeAvailable(pybind11)
# Build the Python extension
pybind11_add_module(_hillmapper ${CMAKE_CURRENT_SOURCE_DIR}/src/hillmapper.cpp)
# Install the compiled extension into the wheel package (hillmapper/)
install(TARGETS _hillmapper
LIBRARY DESTINATION hillmapper # Linux/macOS
ARCHIVE DESTINATION hillmapper # Static libs, if any
RUNTIME DESTINATION hillmapper # Windows DLLs
)