Skip to content

Commit 4bd0c70

Browse files
authored
Merge pull request #2 from fredroy/refresh_v2206
Update for v23.06
2 parents 7567afd + 6df1ccb commit 4bd0c70

File tree

5 files changed

+19
-17
lines changed

5 files changed

+19
-17
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,9 @@ jobs:
2929
3030
- name: Setup SOFA and environment
3131
id: sofa
32-
uses: sofa-framework/sofa-setup-action@v3.0
32+
uses: sofa-framework/sofa-setup-action@v4
3333
with:
34+
sofa_scope: 'standard'
3435
sofa_root: ${{ github.workspace }}/sofa
3536
sofa_version: ${{ matrix.sofa_branch }}
3637

CMakeLists.txt

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ project(PluginExample VERSION 1.0 LANGUAGES CXX)
33

44
# Find and load CMake configuration of packages containing this plugin's dependencies
55
## Mandatory dependencies
6-
find_package(SofaBase REQUIRED) # Dependency to SofaBaseVisual
6+
find_package(Sofa.Component.Visual REQUIRED) # Needed for VisualModelImpl
7+
78
## Optional dependencies
8-
sofa_find_package(SofaGui) # Dependency to SofaGuiQt
9+
sofa_find_package(Sofa.GUI.Qt)
910
sofa_find_package(Qt5 COMPONENTS Core) # Dependency to Qt5Core (needed for qt5_wrap_cpp)
1011

1112
# List all files
@@ -32,7 +33,7 @@ set(README_FILES
3233
README.md
3334
)
3435

35-
if(Qt5Core_FOUND AND SofaGui_FOUND)
36+
if(Qt5Core_FOUND AND Sofa.GUI.Qt_FOUND)
3637
message(STATUS "GUI components have been detected, enable GUI-related components")
3738
list(APPEND HEADER_FILES_TO_MOC
3839
${PLUGINEXAMPLE_SRC_DIR}/MyDataWidgetUnsigned.h
@@ -50,10 +51,10 @@ endif()
5051
add_library(${PROJECT_NAME} SHARED ${HEADER_FILES_TO_MOC} ${MOCCED_HEADER_FILES} ${HEADER_FILES} ${SOURCE_FILES} ${README_FILES})
5152

5253
# Link the plugin library to its dependency(ies).
53-
target_link_libraries(${PROJECT_NAME} SofaBaseVisual)
54+
target_link_libraries(${PROJECT_NAME} Sofa.Component.Visual)
5455
# Link with the optional GUI dependencies.
55-
if(Qt5Core_FOUND AND SofaGui_FOUND)
56-
target_link_libraries(${PROJECT_NAME} SofaGuiQt)
56+
if(Qt5Core_FOUND AND Sofa.GUI.Qt_FOUND)
57+
target_link_libraries(${PROJECT_NAME} Sofa.GUI.Qt)
5758
endif()
5859

5960
# Create package Config, Version & Target files.

PluginExampleConfig.cmake.in

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
@PACKAGE_GUARD@
44
@PACKAGE_INIT@
55

6-
set(PLUGINEXAMPLE_HAVE_SOFAGUI @PLUGINEXAMPLE_HAVE_SOFAGUI@)
7-
set(PLUGINEXAMPLE_HAVE_QT5CORE @PLUGINEXAMPLE_HAVE_QT5CORE@)
6+
set(PLUGINEXAMPLE_HAVE_SOFA_GUI_QT @PLUGINEXAMPLE_HAVE_SOFA_GUI_QT@)
7+
set(PLUGINEXAMPLE_HAVE_QT5_CORE @PLUGINEXAMPLE_HAVE_QT5_CORE@)
88

9-
find_package(SofaBase QUIET REQUIRED)
9+
find_package(Sofa.Component.Visual QUIET REQUIRED)
1010

11-
if(PLUGINEXAMPLE_HAVE_SOFAGUI)
12-
find_package(SofaGui QUIET REQUIRED)
11+
if(PLUGINEXAMPLE_HAVE_SOFA_GUI_QT)
12+
find_package(Sofa.GUI.Qt QUIET REQUIRED)
1313
endif()
14-
if(PLUGINEXAMPLE_HAVE_QT5CORE)
14+
if(PLUGINEXAMPLE_HAVE_QT5_CORE)
1515
find_package(Qt5 COMPONENTS Core QUIET REQUIRED)
1616
endif()
1717

src/PluginExample/MyVisualModel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#include <sofa/core/ObjectFactory.h>
2525

2626

27-
namespace sofa::component::visualmodel
27+
namespace sofa::component::visual
2828
{
2929

3030
MyVisualModel::MyVisualModel()
@@ -47,5 +47,5 @@ void MyVisualModel::reinit()
4747
int MyVisualModelClass = core::RegisterObject("Dummy visual component.").add< MyVisualModel >();
4848

4949

50-
} // namespace sofa::component::visualmodel
50+
} // namespace sofa::component::visual
5151

src/PluginExample/MyVisualModel.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include <sofa/component/visual/VisualModelImpl.h>
2828

2929

30-
namespace sofa::component::visualmodel
30+
namespace sofa::component::visual
3131
{
3232

3333
/**
@@ -53,5 +53,5 @@ class SOFA_PLUGINEXAMPLE_API MyVisualModel : public sofa::component::visual::Vis
5353
};
5454

5555

56-
} // sofa::component::visualmodel
56+
} // sofa::component::visual
5757

0 commit comments

Comments
 (0)