set(SUPERDOG_FOUND TRUE) # auto set(SUPERDOG_VERSION 2.3.0) set(SUPERDOG_ROOT_DIR "C:/car_libs/superdog-c-2.3")
find_path(SUPERDOG_INCLUDE_DIR NAMES superdog/dog_api.h PATHS "${SUPERDOG_ROOT_DIR}/include") mark_as_advanced(SUPERDOG_INCLUDE_DIR) # show entry in cmake-gui
find_library(SUPERDOG_LIBRARY NAMES dog_windows_x64_3150436.lib PATHS "${SUPERDOG_ROOT_DIR}/lib") mark_as_advanced(SUPERDOG_LIBRARY) # show entry in cmake-gui
# use xxx_INCLUDE_DIRS and xxx_LIBRARIES in CMakeLists.txt set(SUPERDOG_INCLUDE_DIRS ${SUPERDOG_INCLUDE_DIR} ) set(SUPERDOG_LIBRARIES ${SUPERDOG_LIBRARY} )
inttest_api() { int feature_id = 111; std::string vendor_code = "xxx"; // from `VendorCodes\BYAUY.hvc` MyDogApi dog(feature_id, vendor_code); int status = dog.login(); // 0 OK, other failed (feature id error, vendor_code error, NO SuperDog)
PYBIND11_MODULE(mydog, m) { // optional module docstring m.doc() = "mydog plugin for python ";
// FUNCTIONS // expose add function, and add keyword arguments and default arguments m.def("add", &add, "A function which adds two numbers", py::arg("i") = 1, py::arg("j") = 2);
// DATA // exporting variables m.attr("the_answer") = 42; py::object world = py::cast("World"); m.attr("what") = world;