Slicer: 2145-support-for-installing-extension-from-file 9594e13d

Author Committer Branch Timestamp Parent
jcfr jcfr 2145-support-for-installing-extension-from-file 2013-02-21 19:45:53 2145-support-for-installing-extension-from-file 449c3d21
Changeset

ENH: Add option WITH_SUBDIR to slicerMacroBuildScriptedModule

Let's illustrate how the macro works considering a simple example. There
is a module named "Foo" having few scripts:

/path/to/Foo/TheFoo.py
/path/to/Foo/FooLib/a.py
/path/to/Foo/FooLib/b.py

First, let's set the following variables:

DESTINATION_DIR = <Slicer-build>/lib/Slicer-4.2/qt-scripted-modules
INSTALL_DIR = /path/to/Slicer/lib/Slicer-4.2/qt-scripted-modules

Two cases are now supported:

  • Default case:

    slicerMacroBuildScriptedModule(
    NAME Foo
    SCRIPTS Foo FooLib/a FooLib/b
    )

    Will be copied into DESTINATION_DIR / INSTALL_DIR:

      &lt;DESTINATION_DIR|INSTALL_DIR>/TheFoo.py
      &lt;DESTINATION_DIR|INSTALL_DIR>/FooLib/a.py
      &lt;DESTINATION_DIR|INSTALL_DIR>/FooLib/b.py
  • WITH_SUBDIR case:

    slicerMacroBuildScriptedModule(
    NAME Foo
    SCRIPTS Foo FooLib/a FooLib/b
    WITH_SUBDIR
    )

    Will be copied into DESTINATION_DIR / INSTALL_DIR:

      &lt;DESTINATION_DIR|INSTALL_DIR>/Foo/TheFoo.py
      &lt;DESTINATION_DIR|INSTALL_DIR>/Foo/FooLib/a.py
      &lt;DESTINATION_DIR|INSTALL_DIR>/Foo/FooLib/b.py

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

mod - CMake/SlicerMacroBuildScriptedModule.cmake Diff File