-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SofaImGui] add python3-loadable module (#95)
* add imgui as a py3 loadable module * fix typo
- Loading branch information
Showing
4 changed files
with
66 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
project(Bindings_SofaImGui) | ||
|
||
set(SOURCE_FILES | ||
${CMAKE_CURRENT_SOURCE_DIR}/Module_SofaImGui.cpp | ||
) | ||
|
||
if (NOT TARGET SofaPython3::Plugin) | ||
find_package(SofaPython3 REQUIRED COMPONENTS SofaImGui Bindings.Sofa) | ||
endif() | ||
|
||
SP3_add_python_module( | ||
TARGET ${PROJECT_NAME} | ||
PACKAGE SofaImGui | ||
MODULE SofaImGui | ||
DESTINATION / | ||
SOURCES ${SOURCE_FILES} | ||
DEPENDS SofaPython3::Plugin SofaPython3::Bindings.Sofa SofaImGui | ||
|
||
) | ||
message("-- SofaPython3 bindings for SofaImGui will be created.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/****************************************************************************** | ||
* SOFA, Simulation Open-Framework Architecture * | ||
* (c) 2021 INRIA, USTL, UJF, CNRS, MGH * | ||
* * | ||
* This program is free software; you can redistribute it and/or modify it * | ||
* under the terms of the GNU Lesser General Public License as published by * | ||
* the Free Software Foundation; either version 2.1 of the License, or (at * | ||
* your option) any later version. * | ||
* * | ||
* This program is distributed in the hope that it will be useful, but WITHOUT * | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License * | ||
* for more details. * | ||
* * | ||
* You should have received a copy of the GNU Lesser General Public License * | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. * | ||
******************************************************************************* | ||
* Contact information: [email protected] * | ||
******************************************************************************/ | ||
|
||
#include <pybind11/pybind11.h> | ||
|
||
#include <SofaImGui/init.h> | ||
|
||
|
||
namespace py { using namespace pybind11; } | ||
|
||
namespace sofaimgui::python3 | ||
{ | ||
|
||
PYBIND11_MODULE(SofaImGui, m) | ||
{ | ||
sofaimgui::init(); | ||
} | ||
|
||
} // namespace sofaimgui::python3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters