Skip to content

Commit

Permalink
add last compat header (seems unused, but in case of)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredroy committed Dec 5, 2020
1 parent 113c763 commit a4618d7
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions SofaKernel/modules/SofaHelper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ set (COMPAT_HEADER_FILES
${COMPATSRC_ROOT}/sofa/helper/gl/glText.h
${COMPATSRC_ROOT}/sofa/helper/gl/glText.inl
${COMPATSRC_ROOT}/sofa/helper/gl/Color.h
${COMPATSRC_ROOT}/sofa/helper/gl/Cylinder.h
)

# Create build and install versions of etc/sofa.ini:
Expand Down
46 changes: 46 additions & 0 deletions SofaKernel/modules/SofaHelper/compat/sofa/helper/gl/Cylinder.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
/******************************************************************************
* SOFA, Simulation Open-Framework Architecture *
* (c) 2006 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/>. *
*******************************************************************************
* Authors: The SOFA Team and external contributors (see Authors.txt) *
* *
* Contact information: contact@sofa-framework.org *
******************************************************************************/
#pragma once

#include <sofa/helper/config.h>

#if __has_include(<sofa/gl/Cylinder.h>)
#include <sofa/gl/Cylinder.h>
#define GL_CYLINDER_ENABLE_WRAPPER

SOFA_DEPRECATED_HEADER(v21.06, "sofa/gl/Cylinder.h")

#else
#error "OpenGL headers have been moved to Sofa.GL; you will need to link against this library if you need OpenGL, and include <sofa/gl/Cylinder.h> instead of this one."
#endif

#ifdef GL_CYLINDER_ENABLE_WRAPPER

namespace sofa::helper::gl
{
using Cylinder = sofa::gl::Cylinder;

} // namespace sofa::helper::gl

#endif // GL_CYLINDER_ENABLE_WRAPPER

#undef GL_CYLINDER_ENABLE_WRAPPER

0 comments on commit a4618d7

Please sign in to comment.