File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 8585 with :
8686 name : deps-artifact
8787 path : ${{ inputs.download-dependencies-path }}
88+ run : |
89+ echo "Downloaded dependencies artifact "
90+ ls -R ${{ inputs.download-dependencies-path }}
8891
8992 - name : Set up Python
9093 uses : actions/setup-python@v5
Original file line number Diff line number Diff line change 1+ cmake_minimum_required (VERSION 3.18)
2+ project (geodesy LANGUAGES CXX)
3+
4+ # 查找 pybind11
5+ find_package (Python3 COMPONENTS Interpreter Development REQUIRED)
6+
7+ # 自动获取 pybind11 的 cmake 路径
8+ execute_process (
9+ COMMAND "${Python3_EXECUTABLE} " -m pybind11 --cmakedir
10+ OUTPUT_VARIABLE pybind11_DIR
11+ OUTPUT_STRIP_TRAILING_WHITESPACE
12+ )
13+ find_package (pybind11 CONFIG REQUIRED HINTS ${pybind11_DIR} )
14+ message (STATUS "Found pybind11 in: ${pybind11_DIR} " )
15+
16+ include_directories (${CMAKE_CURRENT_SOURCE_DIR} /pybindStudy/Cplus/include )
17+
18+ file (GLOB SOURCES "./pybindStudy/Cplus/source/*.cpp" )
19+ pybind11_add_module(
20+ function MODULE ${SOURCES}
21+ )
22+
23+ set (PYBIND_OUTPUT_DIR ${CMAKE_CURRENT_SOURCE_DIR} /python) # 路径可自行选择
24+ set_target_properties (function PROPERTIES
25+ LIBRARY_OUTPUT_DIRECTORY ${PYBIND_OUTPUT_DIR} # 输出路径
26+ )
You can’t perform that action at this time.
0 commit comments