Skip to content
  • jcfr's avatar
    COMP: Fail early building script with PythonQt disabled · c88b17d3
    jcfr authored
    Add error message in cmake to fail early when trying to build a scripted
    python package but the option Slicer_USE_PythonQt is OFF.
    
    ```bash
    CMake Error at Software/Slicer/SlicerCustomAppTemplate/build-SlicerSALT/slicersources-src/CMake/SlicerMacroBuildScriptedModule.cmake:94 (ctkMacroCompilePythonScript):
      Unknown CMake command "ctkMacroCompilePythonScript".
    Call Stack (most recent call first):
      Software/Slicer/SlicerCustomAppTemplate/build-SlicerSALT/Sequences/SequenceSampleData/CMakeLists.txt:17 (slicerMacroBuildScriptedModule)
    ```
    
    This is caused because the cmake macro `ctkMacroCompilePythonScript` is only included when PythonQt is on.
    The macro is moved to the top folder to make it available early.
    
    From: Pablo Hernandez-Cerdan <pablo.hernandez@kitware.com>
    
    git-svn-id: http://svn.slicer.org/Slicer4/trunk@27345 3bd1e089-480b-0410-8dfb-8563597acbee
    c88b17d3