PointCloudLibrary / clang-bind

Generate bindings for C++ code using clang (python bindings) and pybind11
9 stars 4 forks source link

Separate the logic for generation and parsing and user interaction #12

Open kunaltyagi opened 4 years ago

kunaltyagi commented 4 years ago

Make a single script that handles staged as well as end-2-end generation of assets

This will allow there to be 4 components:

Split off from #11

This involves creating a separate script, addressing the issue with compile_database_path and adding a simple cmake generator

kunaltyagi commented 4 years ago

@divmadan Could you please post a simple CMake example for compiling the generated cpp file?

diivm commented 4 years ago

@kunaltyagi Is this what you are looking for?

 cmake_minimum_required(VERSION 3.5) 
 project(bindings) 

 find_package(PCL COMPONENTS common REQUIRED) # depends on usage

 # We can replace `find_package` with `add_subdirectory`, depending on usage. 
 # https://pybind11.readthedocs.io/en/stable/compiling.html#find-package-vs-add-subdirectory  
 find_package(pybind11)

 pybind11_add_module(pcl binded_file.cpp) 
 target_link_libraries(pcl PRIVATE ${PCL_LIBRARIES}) 

There's one in the project too: https://github.com/PointCloudLibrary/clang-bind/blob/master/bindings/python/CMakeLists.txt

kunaltyagi commented 4 years ago

Status: added an interface.py

Needs to route all actions through that (and modify the README to reflect that)