COMP: Prevent confusion by renaming CMake variable appropriately

* "expected_defined_vars" changed into "optional_vars"

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19871 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Option extension metadata should be consistently considered.

In file "SlicerBlockBuildPackageAndUploadExtensions", the following
variables where described as expected whereas they are optional.

  EXTENSION_ICONURL
  EXTENSION_CONTRIBUTORS
  EXTENSION_DESCRIPTION
  EXTENSION_SCREENSHOTURLS


Note also that the mechanism to pass variable will be revised and
simplified. So that default value, type of warning etc .. are all specifed
in one location.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19872 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Ensure extension STATUS metadata is properly considered

Note that currently the value of this metadata is not uploaded to midas

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19873 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: MIDASAPIUploadExtension also considers the optional extension metadata

*

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19874 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Within extension, MIDAS_PACKAGE_{URL, EMAIL, API_KEY} are exposed as option

By default if the user doesn't specify a value, the upload to Midas will fail
and the package will be uploaded to CDash.

That said, no metadata are uploaded to CDash and the extension manager
won't be able to communicate with CDash.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19875 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Prevent error by not building wrapped {MRML,Logic} python libraries if BUILD_SHARED ON

* The call to "set_target_properties" was failing because the corresponding
target wasn't existing.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19876 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Set default EXTENSION_{SOURCE_DIR , SUPERBUILD_BINARY_DIR} to accommodate most use cases

To support the case (scenario 2) where the extension building code is
inside a sub-directory of your project (ie Plastimatch), it makes sens
to set the default of these variables to respectively CMAKE_SOURCE_DIR
and CMAKE_BINARY_DIR.



  Scenario1 (usual):

   root
     |-- CMakeLists.txt  <= Extension description
     |
     |--- A/CMaekLists.txt



  Scenario2:

   root
     |-- CMakeLists.txt
     |
     |--- A/CMaekLists.txt <= Extension description

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19877 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: DCMTK_DIR is now conveniently set in UseSlicer.cmake

Not that, before that change, it could have been possible to
do the following:

   set(DCMTK_DIR ${CTK_DCMTK_DIR})

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19878 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Include Editor(Lib) only if Slicer_USE_PYTHONQT_WITH_TCL is ON

* This is xplained by the Editor.py, EditOptions.py, EditColor.py,
LabelEffect.py and HelperBox.py all have dependency on 'tcl' module.

* It could also probably make sens to exclude/include just part of the
module with TCL is disabled/enabled. Such task will be left to the
maintainer of the module.

* Let's also note that having a test suite associated with the
different EditorEffect would make sens.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19879 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Extend extension build system to support extension revision

Within the s4ext file, the option revision could be specified using
the token "scmrevision".
If not specified or specified to an empty string, the following default
value will be used:
  git: origin/master
  svn: HEAD

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19880 3bd1e089-480b-0410-8dfb-8563597acbee
BUG: Make MIDASAPILogin more robust in case of login failure.

This to avoid error similar to the one reported below:

CMake Error at /path/to/Slicer4/Slicer/CMake/MIDASAPILogin.cmake:64 (string):
  string sub-command REGEX, mode REPLACE needs at least 6 arguments total to
  command.
Call Stack (most recent call first):
  /path/to/Slicer/Extensions/CMake/MIDASAPIUploadExtension.cmake:62 (midas_api_login)
  /path/to/Slicer/Slicer4/Slicer/Extensions/CMake/SlicerBlockBuildPackageAndUploadExtension.cmake:211 (midas_api_upload_extension)

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19881 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Simplify extension template by moving 'SlicerEnableExtensionTesting' into UseSlicer

Assuming MODULE_* variables are sued to specify metadata, creating an
extension is as simple as adding:


...

if(NOT Slicer_SOURCE_DIR)
   find_package(Slicer REQUIRED)
   include(${Slicer_USE_FILE})
endif()

...

if(NOT Slicer_SOURCE_DIR)
  include(${Slicer_EXTENSION_CPACK})
endif()

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19882 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Ensure EXTENSION_{UPLOAD, TEST}_COMMAND works on Visual Studio IDE by setting CMAKE_MAKE_PROGRAM in cache

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19883 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Ensure the CMakeCache of extension contains variables expected when using VisualStudio Generator

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19884 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Allow to build {Experimental, Nightly}Experimental(Upload) target on visual studio by skipping Configuration.

Doing so implies that project is in good order before selecting "build only" on the target.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19885 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Slicer 4.1.0

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19886 3bd1e089-480b-0410-8dfb-8563597acbee
ENH: Begin post-4.1.0 development

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19887 3bd1e089-480b-0410-8dfb-8563597acbee
STYLE: Fix spell mistake in additional launcher settings target name.

Additonal -> Additional

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19888 3bd1e089-480b-0410-8dfb-8563597acbee
COMP: Ensure that SlicerBlockAdditionalLauncherSettings can be included mutliple times

In case UseSlicer.cmake file is included more than once, the target
'ConfigureAdditionalLauncherSettings' was defined more than once which
was causing the following cmake error:

// -----------
CMake Error at /home/jchris/Projects/Slicer4/Extensions/CMake/SlicerBlockAdditionalLauncherSettings.cmake:49 (add_custom_target):
  add_custom_target cannot create target
  "ConfigureAdditionalLauncherSettings" because another target with the same
  name already exists.  The existing target is a custom target created in
  source directory "/home/jchris/Projects/SkullStripper".  See documentation
  for policy CMP0002 for more details.
// -----------


Let's also note that we envision multiple extension built within one
project, only one target is required since the launcher settings are
currently module/extension agnostic.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19889 3bd1e089-480b-0410-8dfb-8563597acbee
STYLE: Within SlicerConfig, change signature of help macro to be consistent with CMake style

CMake build-in function, macro and command are all specified using lower
case letter.

Adding one "_" is also sufficient to indicate the function or macro
is not specifically for re-used outside the code of this module. It also
means that the api and implementation of this function is expected to change.

git-svn-id: http://svn.slicer.org/Slicer4/trunk@19890 3bd1e089-480b-0410-8dfb-8563597acbee