From 859309b07c4ebf419e76692dd37c936f8ea35843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Mon, 16 Sep 2019 18:19:18 +0200 Subject: [PATCH] python: actually install the corrade.pluginmanager module. Pusing this to master was a misteak. Yum. --- src/python/CMakeLists.txt | 1 + src/python/corrade/CMakeLists.txt | 3 +++ src/python/corrade/__init__.py | 2 +- src/python/corrade/corrade.cpp | 4 ++++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt index 8d03206..b6db521 100644 --- a/src/python/CMakeLists.txt +++ b/src/python/CMakeLists.txt @@ -47,6 +47,7 @@ add_subdirectory(magnum) # configure_file() and then replacing generator expressions with file(GENERATE) foreach(target corrade_containers + corrade_pluginmanager magnum_gl magnum_meshtools magnum_primitives diff --git a/src/python/corrade/CMakeLists.txt b/src/python/corrade/CMakeLists.txt index ce20cd6..b5da532 100644 --- a/src/python/corrade/CMakeLists.txt +++ b/src/python/corrade/CMakeLists.txt @@ -71,6 +71,9 @@ if(NOT CORRADE_BUILD_STATIC) # point of static builds). It also nicely avoids problems with multiply-defined # global data. else() + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/staticconfigure.h.cmake + ${CMAKE_CURRENT_BINARY_DIR}/staticconfigure.h) + list(APPEND corrade_SRCS ${corrade_containers_SRCS}) list(APPEND corrade_LIBS Corrade::Containers) diff --git a/src/python/corrade/__init__.py b/src/python/corrade/__init__.py index 4e1432f..4dc3373 100644 --- a/src/python/corrade/__init__.py +++ b/src/python/corrade/__init__.py @@ -33,7 +33,7 @@ import sys # _corrade. The following feels extremely hackish, but without that it wouldn't # be possible to do `import corrade.containers`, which is weird # (`from corrade import containers` works, tho, for whatever reason) -for i in ['containers']: +for i in ['containers', 'pluginmanager']: if i in globals(): sys.modules['corrade.' + i] = globals()[i] # Prevent all submodules being pulled in when saying `from corrade import *` -- diff --git a/src/python/corrade/corrade.cpp b/src/python/corrade/corrade.cpp index 85ef5d6..5a3f36d 100644 --- a/src/python/corrade/corrade.cpp +++ b/src/python/corrade/corrade.cpp @@ -28,6 +28,10 @@ #include "corrade/bootstrap.h" +#ifdef CORRADE_BUILD_STATIC +#include "corrade/staticconfigure.h" +#endif + namespace py = pybind11; /* TODO: remove declaration when https://github.com/pybind/pybind11/pull/1863