Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,20 @@ pybind11_add_module(${extension} MODULE
)
target_include_directories(${extension} PRIVATE ${Python3_NumPy_INCLUDE_DIRS})
target_link_libraries(${extension} PRIVATE ${PDAL_LIBRARIES})

#
# This places the necessary files into the binary directory to allow running
# without installation as long as PYTHONPATH is set to the binary (build) directory.
# Note that if you add ".py" source files, you'll have to re-run cmake to get the
# new file copied to the binary directory.
#
set_target_properties(${extension}
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/pdal
)
file(GLOB PDAL_PYTHON_SOURCES src/pdal/*.py)
foreach(PDAL_PYTHON_FILE ${PDAL_PYTHON_SOURCES})
configure_file(${PDAL_PYTHON_FILE} pdal COPYONLY)
endforeach()

install(TARGETS ${extension} LIBRARY DESTINATION "pdal")
19 changes: 19 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,25 @@ PDAL Python support allows you to process data with PDAL into `Numpy`_ arrays.
It provides a PDAL extension module to control Python interaction with PDAL.
Additionally, you can use it to fetch `schema`_ and `metadata`_ from PDAL operations.

Build
--------------------------------------------------------------------------------
You can build the extension with cmake in the standard way: create a build directory
at the top level of the source tree, run cmake from that build directory and then
run the build tool. If you're a developer, you can then include the build
directory in your PYTHONPATH and then execute Python programs using PDAL without
installation of the extension. This is an example of commands to be executed from
the directory containing this README file for a linux-like system using the Ninja
build tool:

.. code-block::

mkdir build
cd build
cmake -G Ninja ..
ninja
EXPORT PYTHONPATH=.


Installation
--------------------------------------------------------------------------------

Expand Down