Commit 08e741ed authored by jcfr's avatar jcfr

ENH: BuildSystem: Introduce Slicer_BUILD_QT_DESIGNER_PLUGINS option

Enabled by default, this option allows to build Slicer without Qt designer
plugins.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@26538 3bd1e089-480b-0410-8dfb-8563597acbee
parent a7818dba
......@@ -117,8 +117,9 @@ SlicerMacroBuildBaseQtLibrary(
WRAP_PYTHONQT
)
# Plugin
add_subdirectory(DesignerPlugins)
if(Slicer_BUILD_QT_DESIGNER_PLUGINS)
add_subdirectory(DesignerPlugins)
endif()
# --------------------------------------------------------------------------
# Python Wrapping
......
......@@ -319,11 +319,7 @@ SlicerMacroBuildBaseQtLibrary(
# Slicer icon engine
#-----------------------------------------------------------------------------
#
# CTK
#
set(CTK_LIBRARIES CTKWidgets)
ctkMacroBuildQtIconEnginesPlugin(
NAME qSlicerIconEnginePlugin
EXPORT_DIRECTIVE "Q_SLICER_BASE_QTGUI_ICON_ENGINE_EXPORT"
......@@ -333,10 +329,15 @@ ctkMacroBuildQtIconEnginesPlugin(
TARGET_LIBRARIES ${QT_LIBRARIES} ${CTK_LIBRARIES}
)
#-----------------------------------------------------------------------------
# Qt Plugins
add_subdirectory(DesignerPlugins)
#-----------------------------------------------------------------------------
if(Slicer_BUILD_QT_DESIGNER_PLUGINS)
add_subdirectory(DesignerPlugins)
endif()
add_subdirectory(StylePlugins)
#-----------------------------------------------------------------------------
# Testing
# Note: Within both Testing/Cxx and Testing/Python, some code is useful to both Slicer and the
# Extensions. For that reason, the Testing directory is added unconditionally.
......
......@@ -264,6 +264,9 @@ CMAKE_DEPENDENT_OPTION(
"Slicer_BUILD_CLI" OFF
)
option(Slicer_BUILD_QT_DESIGNER_PLUGINS "Build Qt designer plugins" ON)
mark_as_superbuild(Slicer_BUILD_QT_DESIGNER_PLUGINS)
option(Slicer_BUILD_EXTENSIONMANAGER_SUPPORT "Build Slicer extension manager" ON)
mark_as_superbuild(Slicer_BUILD_EXTENSIONMANAGER_SUPPORT)
......
......@@ -59,6 +59,9 @@ if(Slicer_BUILD_CLI_SUPPORT)
set(ModuleDescriptionParser_USE_PYTHON OFF)
endif()
# Qt designer plugins
set(MRML_BUILD_QT_DESIGNER_PLUGINS ${Slicer_BUILD_QT_DESIGNER_PLUGINS})
# ITKFactories directories
set(MRMLIDImageIO_ITKFACTORIES_DIR ${Slicer_ITKFACTORIES_DIR})
set(MRMLIDImageIO_INSTALL_ITKFACTORIES_DIR ${Slicer_INSTALL_ITKFACTORIES_DIR})
......
......@@ -12,6 +12,10 @@ if(NOT DEFINED BUILD_SHARED_LIBS)
option(BUILD_SHARED_LIBS "Build with shared libraries." ON)
endif(NOT DEFINED BUILD_SHARED_LIBS)
if(NOT DEFINED MRML_BUILD_QT_DESIGNER_PLUGINS)
option(MRML_BUILD_QT_DESIGNER_PLUGINS "Build Qt designer plugins." ON)
endif()
include(CheckIncludeFiles)
check_include_files("stdint.h" HAVE_STDINT_H)
......@@ -548,7 +552,9 @@ endif()
# --------------------------------------------------------------------------
# Qt Designer Plugins
# --------------------------------------------------------------------------
add_subdirectory(DesignerPlugins)
if(MRML_BUILD_QT_DESIGNER_PLUGINS)
add_subdirectory(DesignerPlugins)
endif()
# --------------------------------------------------------------------------
# Set INCLUDE_DIRS variable
......
......@@ -67,4 +67,6 @@ SlicerMacroBuildModuleWidgets(
)
#-----------------------------------------------------------------------------
add_subdirectory(DesignerPlugins)
if(Slicer_BUILD_QT_DESIGNER_PLUGINS)
add_subdirectory(DesignerPlugins)
endif()
......@@ -52,9 +52,11 @@ SlicerMacroBuildModuleWidgets(
)
#-----------------------------------------------------------------------------
add_subdirectory(DesignerPlugins)
if(Slicer_BUILD_QT_DESIGNER_PLUGINS)
add_subdirectory(DesignerPlugins)
endif()
# Testing
#-----------------------------------------------------------------------------
if(BUILD_TESTING)
add_subdirectory(Testing)
endif()
......@@ -40,9 +40,11 @@ SlicerMacroBuildModuleWidgets(
)
#-----------------------------------------------------------------------------
add_subdirectory(DesignerPlugins)
if(Slicer_BUILD_QT_DESIGNER_PLUGINS)
add_subdirectory(DesignerPlugins)
endif()
# Testing
#-----------------------------------------------------------------------------
if(BUILD_TESTING)
add_subdirectory(Testing)
endif()
......
......@@ -68,9 +68,11 @@ SlicerMacroBuildModuleWidgets(
)
#-----------------------------------------------------------------------------
if(BUILD_TESTING)
#add_subdirectory(Testing)
if(Slicer_BUILD_QT_DESIGNER_PLUGINS)
add_subdirectory(DesignerPlugins)
endif()
#-----------------------------------------------------------------------------
add_subdirectory(DesignerPlugins)
if(BUILD_TESTING)
#add_subdirectory(Testing)
endif()
......@@ -116,4 +116,6 @@ if(Slicer_USE_PYTHONQT)
endif()
#-----------------------------------------------------------------------------
add_subdirectory(DesignerPlugins)
if(Slicer_BUILD_QT_DESIGNER_PLUGINS)
add_subdirectory(DesignerPlugins)
endif()
......@@ -43,9 +43,11 @@ SlicerMacroBuildModuleWidgets(
)
#-----------------------------------------------------------------------------
add_subdirectory(DesignerPlugins)
if(Slicer_BUILD_QT_DESIGNER_PLUGINS)
add_subdirectory(DesignerPlugins)
endif()
# Testing
#-----------------------------------------------------------------------------
if(BUILD_TESTING)
add_subdirectory(Testing)
endif()
......@@ -52,9 +52,11 @@ SlicerMacroBuildModuleWidgets(
)
#-----------------------------------------------------------------------------
if(BUILD_TESTING)
#add_subdirectory(Testing)
if(Slicer_BUILD_QT_DESIGNER_PLUGINS)
add_subdirectory(DesignerPlugins)
endif()
#-----------------------------------------------------------------------------
add_subdirectory(DesignerPlugins)
if(BUILD_TESTING)
#add_subdirectory(Testing)
endif()
......@@ -47,7 +47,9 @@ SlicerMacroBuildModuleWidgets(
)
#-----------------------------------------------------------------------------
add_subdirectory(DesignerPlugins)
if(Slicer_BUILD_QT_DESIGNER_PLUGINS)
add_subdirectory(DesignerPlugins)
endif()
#-----------------------------------------------------------------------------
if(BUILD_TESTING)
......
......@@ -47,4 +47,6 @@ SlicerMacroBuildModuleWidgets(
)
#-----------------------------------------------------------------------------
add_subdirectory(DesignerPlugins)
if(Slicer_BUILD_QT_DESIGNER_PLUGINS)
add_subdirectory(DesignerPlugins)
endif()
......@@ -65,4 +65,6 @@ SlicerMacroBuildModuleWidgets(
)
#-----------------------------------------------------------------------------
add_subdirectory(DesignerPlugins)
if(Slicer_BUILD_QT_DESIGNER_PLUGINS)
add_subdirectory(DesignerPlugins)
endif()
......@@ -58,9 +58,11 @@ SlicerMacroBuildModuleWidgets(
)
#-----------------------------------------------------------------------------
if(BUILD_TESTING)
#add_subdirectory(Testing)
if(Slicer_BUILD_QT_DESIGNER_PLUGINS)
add_subdirectory(DesignerPlugins)
endif()
#-----------------------------------------------------------------------------
add_subdirectory(DesignerPlugins)
if(BUILD_TESTING)
#add_subdirectory(Testing)
endif()
Markdown is supported
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