diff --git a/CMakeLists.txt b/CMakeLists.txt index ded32d0..cd0a6de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,8 @@ # CMakeLists.txt has to be located in the project folder and cmake has to be # executed from 'project/build' with 'cmake ../'. -cmake_minimum_required(VERSION 2.6) +cmake_minimum_required(VERSION 3.1) +project(vizkit3d_plugin_tutorial VERSION 0.1 DESCRIPTION "vizkit3d plugin tutorial") find_package(Rock) -rock_init(vizkit3d_plugin_tutorial 0.1) +rock_init() +rock_feature(NOCURDIR) rock_standard_layout() diff --git a/src/dummyproject.pc.in b/src/vizkit3d_plugin_tutorial.pc.in similarity index 100% rename from src/dummyproject.pc.in rename to src/vizkit3d_plugin_tutorial.pc.in diff --git a/viz/CMakeLists.txt b/viz/CMakeLists.txt index 754c8d9..065b66a 100644 --- a/viz/CMakeLists.txt +++ b/viz/CMakeLists.txt @@ -1,7 +1,14 @@ -rock_vizkit_plugin(vizkit3d_plugin_tutorial-viz - SphereVisualization.cpp - DEPS vizkit3d_plugin_tutorial - DEPS_PKGCONFIG base-types - MOC SphereVisualization.hpp - HEADERS SphereVisualization.hpp) +rock_find_qt5(OPTIONAL) +rock_find_qt4(OPTIONAL) + +include(RockQt) + +rock_qt_vizkit_plugin( + TARGETPREFIX vizkit3d_plugin_tutorial-viz + QT4_SUFFIX "" + SOURCES SphereVisualization.cpp + MOC SphereVisualization.hpp + HEADERS SphereVisualization.hpp + DEPS vizkit3d_plugin_tutorial + DEPS_PKGCONFIG base-types) diff --git a/viz/SphereVisualization.cpp b/viz/SphereVisualization.cpp index d431c1b..47b8ee9 100644 --- a/viz/SphereVisualization.cpp +++ b/viz/SphereVisualization.cpp @@ -3,6 +3,7 @@ using namespace vizkit3d; + struct SphereVisualization::Data { // Copy of the value given to updateDataIntern. // @@ -62,5 +63,7 @@ double SphereVisualization::getTransparency() return transparency; } -//Macro that makes this plugin loadable in ruby, this is optional. -VizkitQtPlugin(SphereVisualization) +namespace vizkit3d +{ +VizkitQtPluginImpl(SphereVisualization) +} diff --git a/viz/SphereVisualization.hpp b/viz/SphereVisualization.hpp index 099fce3..852b9d2 100644 --- a/viz/SphereVisualization.hpp +++ b/viz/SphereVisualization.hpp @@ -38,5 +38,7 @@ namespace vizkit3d struct Data; Data* p; }; + + VizkitQtPluginHeaderDecls(SphereVisualization) } #endif diff --git a/viz/vizkit_plugin_tutorial-viz.pc.in b/viz/vizkit3d_plugin_tutorial-viz-qt5.pc.in similarity index 77% rename from viz/vizkit_plugin_tutorial-viz.pc.in rename to viz/vizkit3d_plugin_tutorial-viz-qt5.pc.in index 7cccbef..d8d65ae 100644 --- a/viz/vizkit_plugin_tutorial-viz.pc.in +++ b/viz/vizkit3d_plugin_tutorial-viz-qt5.pc.in @@ -3,10 +3,10 @@ exec_prefix=@CMAKE_INSTALL_PREFIX@ libdir=${prefix}/lib includedir=${prefix}/include -Name: vizkit3d_plugin_tutorial-viz +Name: @TARGET_NAME@ Description: vizKit plugin for the vizkit3d_plugin_tutorial library Requires: vizkit3d_plugin_tutorial @PKGCONFIG_DEPS@ Version: @PROJECT_VERSION@ -Libs: -L${libdir} -lvizkit3d_plugin_tutorial-viz +Libs: -L${libdir} -l@TARGET_NAME@ Cflags: -I${includedir} diff --git a/viz/vizkit3d_plugin_tutorial-viz.pc.in b/viz/vizkit3d_plugin_tutorial-viz.pc.in new file mode 100644 index 0000000..d8d65ae --- /dev/null +++ b/viz/vizkit3d_plugin_tutorial-viz.pc.in @@ -0,0 +1,12 @@ +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=@CMAKE_INSTALL_PREFIX@ +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: @TARGET_NAME@ +Description: vizKit plugin for the vizkit3d_plugin_tutorial library +Requires: vizkit3d_plugin_tutorial @PKGCONFIG_DEPS@ +Version: @PROJECT_VERSION@ +Libs: -L${libdir} -l@TARGET_NAME@ +Cflags: -I${includedir} +