Forum Replies Created
-
AuthorPosts
-
fgafarovBlocked
Thank you!
– Copy PluginExample to /sofa/v15.12/src/applications/plugins/ — the PluginExample is initially in this folder– Update /sofa/v15.12/src/applications/plugins/CMakeLists.txt — I can’t understand what I should do, what means ‘Update’. This file initially contains sofa_add_plugin(PluginExample PluginExample)
– Activate the line PLUGIN_PLUGINEXAMPLE — Where is this line
– Configure and finally Generate –please write me which commands I need to executefgafarovBlockedThank you. But I am working on Ubuntu not on Windows. I have not experience with cmake earlier.
My steps:
1) I have compiled and run Sofa according https://www.sofa-framework.org/community/doc/getting-started/build/build-on-linux/
2) copied PluginExample to /sofa/v15.12/build/applications/plugins/
3) in /sofa/v15.12/build/applications/plugins/PluginExample executed command cmake .and I have the error mentioned above.
fgafarovBlockedI am using default plugin.
It is CMAKELists.txt file:
cmake_minimum_required(VERSION 2.8.12) project(PluginExample) set(HEADER_FILES MyBehaviorModel.h MyMappingPendulumInPlane.h MyMappingPendulumInPlane.inl MyProjectiveConstraintSet.h MyProjectiveConstraintSet.inl config.h ) set(HEADER_FILES_TO_MOC MyDataWidgetUnsigned.h ) set(SOURCE_FILES MyBehaviorModel.cpp MyDataWidgetUnsigned.cpp MyMappingPendulumInPlane.cpp MyProjectiveConstraintSet.cpp initPlugin.cpp ) set(README_FILES PluginExample.txt) find_package(SofaGui REQUIRED) find_package(Qt5 COMPONENTS Core QUIET) if(Qt5Core_FOUND) qt5_wrap_cpp(MOCCED_HEADER_FILES ${HEADER_FILES_TO_MOC}) else() find_package(Qt4 COMPONENTS qtcore) qt4_wrap_cpp(MOCCED_HEADER_FILES ${HEADER_FILES_TO_MOC}) endif() add_library(${PROJECT_NAME} SHARED ${HEADER_FILES_TO_MOC} ${MOCCED_HEADER_FILES} ${HEADER_FILES} ${SOURCE_FILES} ${README_FILES}) set_target_properties(${PROJECT_NAME} PROPERTIES COMPILE_FLAGS "-DSOFA_BUILD_PLUGINEXAMPLE") target_link_libraries(${PROJECT_NAME} SofaGuiQt) include_directories("${CMAKE_CURRENT_SOURCE_DIR}/..") install(TARGETS ${PROJECT_NAME} COMPONENT PluginExample_libraries EXPORT PluginExampleTargets RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
-
AuthorPosts