From 4246f336425a1730cb4bbab244594e94c1670922 Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Tue, 17 Oct 2023 15:13:19 -0400 Subject: [PATCH] build: track xo-cmake streamlining --- CMakeLists.txt | 2 +- src/pyreflect/CMakeLists.txt | 4 ++-- src/pyreflect/pyreflect.cpp | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9c372fd5..ccf4b129 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -42,7 +42,7 @@ add_subdirectory(src/pyreflect) # ---------------------------------------------------------------- # provide find_package() support -xo_export_cmake_config(${PROJECT_NAME} ${PROJECT_VERSION} pyreflectTargets) +xo_export_cmake_config(${PROJECT_NAME} ${PROJECT_VERSION} ${PROJECT_NAME}Targets) # ---------------------------------------------------------------- # install .hpp files diff --git a/src/pyreflect/CMakeLists.txt b/src/pyreflect/CMakeLists.txt index 0579d761..94a71814 100644 --- a/src/pyreflect/CMakeLists.txt +++ b/src/pyreflect/CMakeLists.txt @@ -1,4 +1,4 @@ -# xo_pyreflect/CMakeLists.txt +# xo_pyreflect/src/pyreflect/CMakeLists.txt set(SELF_LIB pyreflect) set(SELF_SRCS pyreflect.cpp) @@ -6,7 +6,7 @@ set(SELF_SRCS pyreflect.cpp) # ---------------------------------------------------------------- # pybind11 dep -xo_pybind11_library(${SELF_LIB} ${SELF_SRCS}) +xo_pybind11_library(${SELF_LIB} ${PROJECT_NAME}Targets ${SELF_SRCS}) xo_pybind11_dependency(${SELF_LIB} reflect) diff --git a/src/pyreflect/pyreflect.cpp b/src/pyreflect/pyreflect.cpp index 3a9f81bb..0b638658 100644 --- a/src/pyreflect/pyreflect.cpp +++ b/src/pyreflect/pyreflect.cpp @@ -26,7 +26,8 @@ namespace xo { //py::class_(m, "utc_nanos"); //py::class_(m, "TypeDescr"); - py::class_>(m, "TypeDescr") + py::class_>(m, "TypeDescr") .def_static("print_reflected_types", [](){ TypeDescrBase::print_reflected_types(std::cout); }) .def_property_readonly("canonical_name", &TypeDescrBase::canonical_name)