build: bugfix SELF_LIB consistency + streamline CMAKE_MODULE_PATH

This commit is contained in:
Roland Conybeare 2024-03-15 19:40:26 -04:00
commit 2f908b7c36
6 changed files with 43 additions and 7 deletions

View file

@ -1,6 +1,6 @@
# xo_pyprocess/src/pyprocess/CMakeLists.txt
set(SELF_LIB pyprocess)
set(SELF_LIB xo_pyprocess)
set(SELF_SRCS pyprocess.cpp)
xo_pybind11_library(${SELF_LIB} ${PROJECT_NAME}Targets ${SELF_SRCS})

View file

@ -8,18 +8,18 @@
* example:
* PYBIND11_MODULE(PYPROCESS_MODULE_NAME(), m) { ... }
*/
#define PYPROCESS_MODULE_NAME() @SELF_LIBRARY_NAME@
#define PYPROCESS_MODULE_NAME() @SELF_LIB@
/* example:
* py::module_::import(PYPROCESS_MODULE_NAME_STR)
*/
#define PYPROCESS_MODULE_NAME_STR "@SELF_LIBRARY_NAME@"
#define PYPROCESS_MODULE_NAME_STR "@SELF_LIB@"
/* example:
* PYPROCESS_IMPORT_MODULE()
* replaces
* py::module_::import("pyprocess")
*/
#define PYPROCESS_IMPORT_MODULE() py::module_::import("@SELF_LIBRARY_NAME@")
#define PYPROCESS_IMPORT_MODULE() py::module_::import("@SELF_LIB@")
/* end pyprocess.hpp */