forked from chibai/apriltag-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
39 lines (32 loc) · 1.22 KB
/
CMakeLists.txt
File metadata and controls
39 lines (32 loc) · 1.22 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
foreach(X IN ITEMS apriltag_detect.docstring apriltag_estimate_tag_pose.docstring apriltag_pywrap.c CMakeLists.txt)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/src/${X}
${CMAKE_CURRENT_SOURCE_DIR}/src/apriltag/apriltag/${X}
COPYONLY
)
endforeach()
# Top-level CMakeLists.txt for scikit-build-core
cmake_minimum_required(VERSION 3.16)
project(${SKBUILD_PROJECT_NAME}
VERSION ${SKBUILD_PROJECT_VERSION}
DESCRIPTION "Python wrapper for the AprilTag visual fiducial detector"
LANGUAGES C)
# Set rpath for shared libraries to be found at runtime
if(APPLE)
set(CMAKE_INSTALL_RPATH "@loader_path")
elseif(UNIX)
set(CMAKE_INSTALL_RPATH "$ORIGIN")
endif()
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
# Find Python and NumPy
find_package(Python3 REQUIRED COMPONENTS Development.Module NumPy)
message(STATUS "Found Python ${Python3_VERSION}")
add_subdirectory(src/apriltag/apriltag)
# Install the Python module
# scikit-build-core will automatically handle installation to the correct location
install(TARGETS apriltag.${Python3_SOABI}
LIBRARY DESTINATION apriltag
RUNTIME DESTINATION apriltag)
install(TARGETS apriltag
LIBRARY DESTINATION apriltag
RUNTIME DESTINATION apriltag)