diff --git a/CMakeLists.txt b/CMakeLists.txt index fe1180e..c590a4d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,11 @@ option(MV_UNITY_BUILD "Combine target source files into batches for faster compi # Scatterplot Plugin # ----------------------------------------------------------------------------- set(PROJECT "ScatterplotPlugin") -PROJECT(${PROJECT}) + +PROJECT(${PROJECT} + DESCRIPTION "A scatterplot viewer plugin for ManiVault" + LANGUAGES CXX +) # ----------------------------------------------------------------------------- # CMake Options @@ -16,12 +20,12 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTORCC ON) set(CMAKE_AUTOMOC ON) -if(MSVC) +if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DWIN32 /EHsc /MP /permissive- /Zc:__cplusplus") set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MDd") set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} /MD") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MD") -endif(MSVC) +endif() # ----------------------------------------------------------------------------- # Dependencies @@ -38,10 +42,6 @@ set(PLUGIN src/ScatterplotPlugin.cpp ) -set(PLUGIN_MOC_HEADERS - src/ScatterplotPlugin.h -) - set(UI src/ScatterplotWidget.h src/ScatterplotWidget.cpp @@ -88,7 +88,7 @@ set(Models ) set(AUX - src/ScatterplotPlugin.json + PluginInfo.json ) set(SOURCES ${PLUGIN} ${UI} ${Actions} ${Models}) @@ -147,16 +147,13 @@ add_custom_command(TARGET ${PROJECT} POST_BUILD --prefix ${ManiVault_INSTALL_DIR}/$ ) -set_target_properties(${PROJECT} - PROPERTIES - FOLDER ViewPlugins -) +mv_handle_plugin_config(${PROJECT}) # ----------------------------------------------------------------------------- # Miscellaneous # ----------------------------------------------------------------------------- # Automatically set the debug environment (command + working directory) for MSVC -if(MSVC) +if(CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") set_property(TARGET ${PROJECT} PROPERTY VS_DEBUGGER_WORKING_DIRECTORY $,${ManiVault_INSTALL_DIR}/Debug,$,${ManiVault_INSTALL_DIR}/RelWithDebInfo,${ManiVault_INSTALL_DIR}/Release>>) set_property(TARGET ${PROJECT} PROPERTY VS_DEBUGGER_COMMAND $,"${ManiVault_INSTALL_DIR}/Debug/ManiVault Studio.exe",$,"${ManiVault_INSTALL_DIR}/RelWithDebInfo/ManiVault Studio.exe","${ManiVault_INSTALL_DIR}/Release/ManiVault Studio.exe">>) endif() diff --git a/PluginInfo.json b/PluginInfo.json new file mode 100644 index 0000000..72af000 --- /dev/null +++ b/PluginInfo.json @@ -0,0 +1,9 @@ +{ + "name" : "Scatterplot View", + "version" : { + "plugin" : "1.0.0", + "core" : ["1.3"] + }, + "type" : "Viewer", + "dependencies" : ["Points"] +} diff --git a/src/ScatterplotPlugin.h b/src/ScatterplotPlugin.h index 23b8250..d1264fc 100644 --- a/src/ScatterplotPlugin.h +++ b/src/ScatterplotPlugin.h @@ -132,7 +132,7 @@ class ScatterplotPluginFactory : public ViewPluginFactory Q_INTERFACES(mv::plugin::ViewPluginFactory mv::plugin::PluginFactory) Q_OBJECT Q_PLUGIN_METADATA(IID "studio.manivault.ScatterplotPlugin" - FILE "ScatterplotPlugin.json") + FILE "PluginInfo.json") public: ScatterplotPluginFactory(); diff --git a/src/ScatterplotPlugin.json b/src/ScatterplotPlugin.json deleted file mode 100644 index 6188f28..0000000 --- a/src/ScatterplotPlugin.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name" : "Scatterplot View", - "version" : "1", - "dependencies" : ["Points"] -}