package An official xmake package repository
https://xrepo.xmake.io/
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
2.0 KiB
69 lines
2.0 KiB
2 months ago
|
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
|
||
|
index 37cadf4..bd29874 100644
|
||
|
--- a/python/CMakeLists.txt
|
||
|
+++ b/python/CMakeLists.txt
|
||
|
@@ -6,13 +6,7 @@ if(NOT DART_BUILD_DARTPY)
|
||
|
endif()
|
||
|
|
||
|
# Set up pybind11
|
||
|
-include(FetchContent)
|
||
|
-FetchContent_Declare(
|
||
|
- pybind11
|
||
|
- GIT_REPOSITORY https://github.com/pybind/pybind11
|
||
|
- GIT_TAG v2.12.0
|
||
|
-)
|
||
|
-FetchContent_MakeAvailable(pybind11)
|
||
|
+find_package(pybind11 CONFIG)
|
||
|
|
||
|
if(NOT pybind11_FOUND)
|
||
|
message(WARNING "Disabling [dartpy] due to missing pybind11 >= 2.2.0.")
|
||
|
@@ -22,9 +16,6 @@ endif()
|
||
|
set(DART_DARTPY_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/dartpy")
|
||
|
|
||
|
add_subdirectory(dartpy)
|
||
|
-add_subdirectory(tests)
|
||
|
-add_subdirectory(examples)
|
||
|
-add_subdirectory(tutorials)
|
||
|
|
||
|
message(STATUS "")
|
||
|
message(STATUS "[ dartpy ]")
|
||
|
diff --git a/python/dartpy/CMakeLists.txt b/python/dartpy/CMakeLists.txt
|
||
|
index b316e86..d33c16f 100644
|
||
|
--- a/python/dartpy/CMakeLists.txt
|
||
|
+++ b/python/dartpy/CMakeLists.txt
|
||
|
@@ -6,12 +6,7 @@
|
||
|
#
|
||
|
# This file is provided under the "BSD-style" License
|
||
|
|
||
|
-execute_process(COMMAND ${Python3_EXECUTABLE} -c
|
||
|
- "from distutils.sysconfig import get_python_lib;\
|
||
|
- print(get_python_lib(plat_specific=True))"
|
||
|
- OUTPUT_VARIABLE PYTHON_SITE_PACKAGES
|
||
|
- OUTPUT_STRIP_TRAILING_WHITESPACE
|
||
|
-)
|
||
|
+set(PYTHON_SITE_PACKAGES "lib/site-packages")
|
||
|
if(NOT IS_ABSOLUTE ${PYTHON_SITE_PACKAGES})
|
||
|
set(PYTHON_SITE_PACKAGES "${CMAKE_INSTALL_PREFIX}/${PYTHON_SITE_PACKAGES}")
|
||
|
endif()
|
||
|
@@ -29,7 +24,6 @@ set(pybind_module dartpy)
|
||
|
#
|
||
|
pybind11_add_module(${pybind_module}
|
||
|
MODULE
|
||
|
- EXCLUDE_FROM_ALL
|
||
|
${dartpy_headers}
|
||
|
${dartpy_sources}
|
||
|
)
|
||
|
@@ -91,9 +85,9 @@ endif()
|
||
|
|
||
|
# TODO: Fix installing dartpy to site-packages directory
|
||
|
# Install the pybind module to site-packages directory
|
||
|
-# install(TARGETS ${pybind_module}
|
||
|
-# LIBRARY DESTINATION "${PYTHON_SITE_PACKAGES}"
|
||
|
-# )
|
||
|
+install(TARGETS ${pybind_module}
|
||
|
+ LIBRARY DESTINATION "${PYTHON_SITE_PACKAGES}"
|
||
|
+)
|
||
|
|
||
|
list(REMOVE_ITEM dartpy_headers
|
||
|
${CMAKE_CURRENT_LIST_DIR}/eigen_geometry_pybind.h
|