Commit 79a74540 authored by John Tourtellott's avatar John Tourtellott
Browse files

Add plugin build

parent b3930fd6
......@@ -38,3 +38,59 @@ endif()
# Build libs
add_subdirectory(smtk)
if (NOT SMTK_ENABLE_PARAVIEW_SUPPORT)
message("Not building plugin -- SMTK not built with ParaView support.")
else()
# Build the plugin
paraview_plugin_scan(
PLUGIN_FILES plugin/paraview.plugin
PROVIDES_PLUGINS paraview_plugins
ENABLE_BY_DEFAULT ON
HIDE_PLUGINS_FROM_CACHE ON)
set(autoload_args AUTOLOAD)
option(ENABLE_PLUGIN_BY_DEFAULT "Automatically enable the plugin in CMB modelbuilder" OFF)
if (ENABLE_PLUGIN_BY_DEFAULT)
list(APPEND autoload_args ${paraview_plugins})
endif ()
string(REPLACE "-" "_" safe_project_name "${PROJECT_NAME}")
paraview_plugin_build(
LIBRARY_SUBDIRECTORY "smtk-${smtk_VERSION}"
PLUGINS ${paraview_plugins}
PLUGINS_FILE_NAME "smtk.ace3p.xml"
${autoload_args}
INSTALL_EXPORT ${PROJECT_NAME}-plugin
HEADERS_DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}/${PROJECT_VERSION}"
CMAKE_DESTINATION "${CMAKE_INSTALL_CMAKEDIR}"
ADD_INSTALL_RPATHS ON
TARGET ${safe_project_name}_paraview_plugins)
include(CMakePackageConfigHelpers)
# Our requirements for a version file are basic, so we use CMake's basic version
# file generator
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}/${PROJECT_NAME}-config-version.cmake"
VERSION ${${PROJECT_NAME}_VERSION}
COMPATIBILITY AnyNewerVersion)
export(
EXPORT ${PROJECT_NAME}
FILE "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_CMAKEDIR}/${PROJECT_NAME}-targets.cmake")
install(
EXPORT ${PROJECT_NAME}
DESTINATION "${CMAKE_INSTALL_CMAKEDIR}"
FILE "${PROJECT_NAME}-targets.cmake")
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/CMake/smtk-plugin-config.cmake.in"
"${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_CMAKEDIR}/${PROJECT_NAME}-config.cmake"
@ONLY)
install(
FILES "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_CMAKEDIR}/${PROJECT_NAME}-config.cmake"
DESTINATION "${CMAKE_INSTALL_CMAKEDIR}")
endif ()
set(PluginHdrs
pqCumulusJobsPanel.h
)
set(PluginSrcs
pqCumulusJobsPanel.cxx
)
set(CMAKE_AUTOMOC 1)
# Specify the dock widget
paraview_plugin_add_dock_window(
CLASS_NAME pqCumulusJobsPanel
DOCK_AREA Left
INTERFACES dock_interfaces
SOURCES dock_sources
)
# Specify the plugin
paraview_add_plugin(smtkACE3PPlugin
VERSION "1.0"
UI_INTERFACES ${dock_interfaces}
SOURCES
${PluginHdrs}
${PluginSrcs}
${dock_sources}
)
target_link_libraries(smtkACE3PPlugin
LINK_PUBLIC
smtkCumulus
smtkCore
smtkPQComponentsExt
ParaView::pqApplicationComponents
ParaView::pqComponents
Qt5::Core
)
target_include_directories(smtkACE3PPlugin PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>
)
NAME
smtkACE3PPlugin
DESCRIPTION
Plugin for ACE3P simulation workflows.
REQUIRES_MODULES
ParaView::pqApplicationComponents
ParaView::pqComponents
......@@ -23,7 +23,6 @@ set(src
utils.cxx
cumuluswidget.cxx
mainwindow.cxx
pqCumulusJobsPanel.cxx
cJSON.c
)
......@@ -36,7 +35,6 @@ set(mochdrs
jobtablewidget.h
jobview.h
mainwindow.h
pqCumulusJobsPanel.h
)
set(CMAKE_AUTOUIC 1)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment