View Issue Details

IDProjectCategoryView StatusLast Update
0001739Slicer4Core: Building (CMake, Superbuild)public2017-06-10 08:51
Reporterdomibel Assigned Tojcfr  
PriorityhighSeverityfeatureReproducibilityhave not tried
Status closedResolutionfixed 
Product Version 
Target VersionSlicer 4.4.0Fixed in VersionSlicer 4.4.0 
Summary0001739: SLICER_USE_SYSTEM_xyzlib for each superbuild dependency
Description

It would be very helpful to have a way to compile Slicer against system libraries. This would reduce the compile time drastically and help with debugging of issues caused by underlying libraries.

TagsNo tags attached.

Relationships

related to 0003268 closedjcfr Cannot set PYTHON_DIR 

Activities

jcfr

jcfr

2013-06-04 06:24

administrator   ~0008701

From Peter Karasev:

Initial symptom:
(1) extension kslice fails to load at startup but can be imported
subsequently in python shell of nightly build
(2) rebuilding slicer and running gives 'teem.dll missing!' crash

Problem: there was another version of python 2.7.3 built with vs2012
in the path and the following was in my settings:
PATH=%PATH%;C:\hped\builds\tfstools\vs2012\win32_64\python\2.7.3\win32_64\debug\python
PYTHONPATH=%PYTHONPATH%;C:\hped\builds\tfstools\vs2012\win32_64\python\2.7.3\win32_64\debug\python

Slicer ignores most of this but it picks up python27_d.lib throughout
superbuild for "python debug library" since it does not get created in
slicer's python-build. I would think that deleting the offending
directory from environment variables and re-running cmake at the
superbuild level would be enough, but, no dice.
Fully purging the debug python required manually editing
CMakeCache.txt for CTK, VTK, Slicer, and so on, re-running cmake for
each project, open solution file and launching build for each item in
the superbuild that uses python.

Maybe this rarely happens or is intended behavior, but I'd imagine it
is a possibility for anyone on windows that has a program adding
itself to the path that provides a library not used in slicer yet
searched for by the find_package() commands...

// ------------------------
From Jc:

Hi Peter,

This problem would occur only for developer build, in the case the user download a build package, I don't think he would have any issue.

For developers, I see two approaches:

1) the problem could probably be solved:

  • ensuring all project calling "find_package(PythonLibs)" are patched to optionally passe the option "NO_SYSTEM_ENVIRONMENT_PATH"
  • patching the module "FindPythonLibs.cmake" bundled in CMake so that it can use the option "NO_SYSTEM_ENVIRONMENT_PATH" to also pass it down to the different "find_library" calls.

2) Alternatively, project like CTK, VTK or Slicer could simply not call "find_package(PythonLibs)" and expect the variable PYTHON_EXECUTABLE, PYTHON_LIBRARIES, ... to be properly set. The "find_package" call would be done only if Slicer is build with Slicer_USE_SYSTEM_PYTHON.

I think option (2) is the way to go. The is capture by issue 0001739

Let me know what you think.

domibel

domibel

2013-08-19 07:25

developer   ~0009508

Can this be bumped to a high priority feature in 4.4?

jcfr

jcfr

2013-08-19 07:26

administrator   ~0009509

Last edited: 2013-08-19 07:26

All set - Changed into Feature with high priority.

domibel

domibel

2013-11-07 15:46

developer   ~0010294

Hi Jc,

this might not be the most elegant fix but it works for me. Would you except a patch like the following one as a basis for a real fix? I would use this option for the nightly dashboard submissions, it would allow me to turn on more tests because the machine doesn't have to recompile ITK etc...

diff --git a/SuperBuild/External_ITKv4.cmake b/SuperBuild/External_ITKv4.cmake
index 396aa02..b86fd1a 100644
--- a/SuperBuild/External_ITKv4.cmake
+++ b/SuperBuild/External_ITKv4.cmake
@@ -6,6 +6,20 @@ if(${CMAKE_CURRENT_LIST_FILENAME}_FILE_INCLUDED)
endif()
set(${CMAKE_CURRENT_LIST_FILENAME}_FILE_INCLUDED 1)

+if (Slicer_USE_SYSTEM_ITKv4)
+

  • find_package(ITK REQUIRED)
  • create dummy external project

  • ExternalProject_Add(ITKv4
  • SOURCE_DIR ${CMAKE_BINARY_DIR}
  • CONFIGURE_COMMAND ""
  • BUILD_COMMAND ""
  • INSTALL_COMMAND ""
  • )
  • +else()

  • Sanity checks

    if(DEFINED ITK_DIR AND NOT EXISTS ${ITK_DIR})
    message(FATAL_ERROR "ITK_DIR variable is defined but corresponds to non-existing directory")
    @@ -118,3 +132,5 @@ else()

    let's add an 'empty' one

    SlicerMacroEmptyExternalProject(${proj} "${ITKv4_DEPENDENCIES}")
    endif()

  • +endif()
    diff --git a/SuperBuild/External_python.cmake b/SuperBuild/External_python.cmake
    index 0c8537f..4a69580 100644
    --- a/SuperBuild/External_python.cmake
    +++ b/SuperBuild/External_python.cmake
    @@ -6,6 +6,25 @@ if(${CMAKE_CURRENT_LIST_FILENAME}_FILE_INCLUDED)
    endif()
    set(${CMAKE_CURRENT_LIST_FILENAME}_FILE_INCLUDED 1)

+if (Slicer_USE_SYSTEM_PYTHON)
+

  • find_package(PythonLibs REQUIRED)
  • find_package(PythonInterp REQUIRED)
  • set(slicer_PYTHON_INCLUDE ${PYTHON_INCLUDE_DIRS})
  • set(slicer_PYTHON_LIBRARY ${PYTHON_LIBRARIES})
  • set(slicer_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})
  • create dummy external project

  • ExternalProject_Add(python
  • SOURCE_DIR ${CMAKE_BINARY_DIR}
  • CONFIGURE_COMMAND ""
  • BUILD_COMMAND ""
  • INSTALL_COMMAND ""
  • )
  • +else()

  • Set dependency list

    set(python_DEPENDENCIES zlib CTKAPPLAUNCHER)
    if(Slicer_USE_PYTHONQT_WITH_TCL)
    @@ -173,6 +192,11 @@ else()
    SlicerMacroEmptyExternalProject(${proj} "${python_DEPENDENCIES}")
    endif()

+endif()
+
+message(STATUS "MSVC_VERSION:${MSVC_VERSION}")
+message(STATUS "python_URL:${python_URL}")
+message(STATUS "CMAKE_GENERATOR:${CMAKE_GENERATOR}")

message(STATUS "slicer_PYTHON_INCLUDE:${slicer_PYTHON_INCLUDE}")
You have new mail in /var/mail/domibel
domibel@sonne:~/Slicer$ git diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5efb1d1..1c8c8a3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -208,6 +208,15 @@ mark_as_advanced(Slicer_FORCED_WC_REVISION)
#-----------------------------------------------------------------------------

External projects related options

#-----------------------------------------------------------------------------
+option(Slicer_USE_SYSTEM_PYTHON "Use python system libraries" OFF)
+mark_as_advanced(Slicer_USE_SYSTEM_PYTHON)
+
+option(Slicer_USE_SYSTEM_ITKv4 "Use itkv4 system libraries" OFF)
+mark_as_advanced(Slicer_USE_SYSTEM_ITKv4)
+
+option(Slicer_USE_SYSTEM_DCMTK "Use DCMTK system libraries" OFF)
+mark_as_advanced(Slicer_USE_SYSTEM_DCMTK)
+
CMAKE_DEPENDENT_OPTION(
Slicer_USE_PYTHONQT_WITH_OPENSSL "Enable PythonQt SSL support" OFF
"Slicer_USE_PYTHONQT" OFF)

 ITKZLIB

diff --git a/SuperBuild/External_DCMTK.cmake b/SuperBuild/External_DCMTK.cmake
index a53834d..1c1d04d 100644
--- a/SuperBuild/External_DCMTK.cmake
+++ b/SuperBuild/External_DCMTK.cmake
@@ -6,6 +6,21 @@ if(${CMAKE_CURRENT_LIST_FILENAME}_FILE_INCLUDED)
endif()
set(${CMAKE_CURRENT_LIST_FILENAME}_FILE_INCLUDED 1)

+if (Slicer_USE_SYSTEM_DCMTK)
+

  • find_package(DCMTK REQUIRED)
  • create dummy external project

  • ExternalProject_Add(DCMTK
  • SOURCE_DIR ${CMAKE_BINARY_DIR}
  • CONFIGURE_COMMAND ""
  • BUILD_COMMAND ""
  • INSTALL_COMMAND ""
  • )
  • +else()

  • Set dependency list

    set(DCMTK_DEPENDENCIES "zlib")

@@ -77,3 +92,5 @@ else()

let's add an 'empty' one

SlicerMacroEmptyExternalProject(${proj} "${DCMTK_DEPENDENCIES}")
endif()
+
+endif()
\ No newline at end of file
diff --git a/SuperBuild/External_ITKv4.cmake b/SuperBuild/External_ITKv4.cmake
index 396aa02..b86fd1a 100644
--- a/SuperBuild/External_ITKv4.cmake
+++ b/SuperBuild/External_ITKv4.cmake
@@ -6,6 +6,20 @@ if(${CMAKE_CURRENT_LIST_FILENAME}_FILE_INCLUDED)
endif()
set(${CMAKE_CURRENT_LIST_FILENAME}_FILE_INCLUDED 1)

+if (Slicer_USE_SYSTEM_ITKv4)
+

  • find_package(ITK REQUIRED)
  • create dummy external project

  • ExternalProject_Add(ITKv4
  • SOURCE_DIR ${CMAKE_BINARY_DIR}
  • CONFIGURE_COMMAND ""
  • BUILD_COMMAND ""
  • INSTALL_COMMAND ""
  • )
  • +else()

  • Sanity checks

    if(DEFINED ITK_DIR AND NOT EXISTS ${ITK_DIR})
    message(FATAL_ERROR "ITK_DIR variable is defined but corresponds to non-existing directory")
    @@ -118,3 +132,5 @@ else()

    let's add an 'empty' one

    SlicerMacroEmptyExternalProject(${proj} "${ITKv4_DEPENDENCIES}")
    endif()

  • +endif()
    diff --git a/SuperBuild/External_python.cmake b/SuperBuild/External_python.cmake
    index 0c8537f..4a69580 100644
    --- a/SuperBuild/External_python.cmake
    +++ b/SuperBuild/External_python.cmake
    @@ -6,6 +6,25 @@ if(${CMAKE_CURRENT_LIST_FILENAME}_FILE_INCLUDED)
    endif()
    set(${CMAKE_CURRENT_LIST_FILENAME}_FILE_INCLUDED 1)

+if (Slicer_USE_SYSTEM_PYTHON)
+

  • find_package(PythonLibs REQUIRED)
  • find_package(PythonInterp REQUIRED)
  • set(slicer_PYTHON_INCLUDE ${PYTHON_INCLUDE_DIRS})
  • set(slicer_PYTHON_LIBRARY ${PYTHON_LIBRARIES})
  • set(slicer_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})
  • create dummy external project

  • ExternalProject_Add(python
  • SOURCE_DIR ${CMAKE_BINARY_DIR}
  • CONFIGURE_COMMAND ""
  • BUILD_COMMAND ""
  • INSTALL_COMMAND ""
  • )
  • +else()

  • Set dependency list

    set(python_DEPENDENCIES zlib CTKAPPLAUNCHER)
    if(Slicer_USE_PYTHONQT_WITH_TCL)
    @@ -173,6 +192,11 @@ else()
    SlicerMacroEmptyExternalProject(${proj} "${python_DEPENDENCIES}")
    endif()

+endif()
+
+message(STATUS "MSVC_VERSION:${MSVC_VERSION}")
+message(STATUS "python_URL:${python_URL}")
+message(STATUS "CMAKE_GENERATOR:${CMAKE_GENERATOR}")

jcfr

jcfr

2013-11-11 22:25

administrator   ~0010306

Hi Dominique,

Thanks for providing a initial patch.

I started to improve the current build system to support Slicer_USESYSTEM* option more exhaustively.

Here is the topic: https://github.com/jcfr/Slicer/commits/1739-support-use-system-option

This is still work in progress. It currently support options like:

-DSlicer_USE_SYSTEM_zlib:BOOL=ON
-DSlicer_USE_SYSTEM_python:BOOL=ON
-DSlicer_USE_SYSTEM_NUMPY:BOOL=ON
-DSlicer_USE_SYSTEM_tcl:BOOL=ON
-DSlicer_USE_SYSTEM_LibArchive:BOOL=ON

The interesting part is that by simply configuring with:

-DSlicer_USE_SYSTEM_python:BOOL=ON

Since python depends on the projects "zlib", "NUMPY", "tcl". These ones will be expected to be available on the system.

Let me know what you think.

Based on your feedback, I propose we continue the effort. I think the current approach will make packaging easier.

Jc

domibel

domibel

2013-11-12 10:57

developer   ~0010307

This looks very nice. One annoying library is 'slicerlibcurl', which is a unpatched copy of curl, so this can be added to the system package list as well.
(libcurl-dev on Debian)

jcfr

jcfr

2013-11-12 11:17

administrator   ~0010308

Hi,

Agreed. Will try to work something out regarding "slicerlibcurl".

I noticed few things:

(1) The FindDCMTK.cmake of ITKv4 is broken, it can't find system DCMTK even after passing DCMTK_DIR:PATH=/usr ... I will see how to fix this in upstream ITK. By for example contributing this version: https://github.com/jcfr/CTK/compare/382-fix-find-dcmtk-issue

(2) installing libdcmtk2-dev on Ubuntu 13.10, I have to also manually pass -DHAVE_CONFIG_H when building ITK, CTK, Slicer. Is this fix in debian testing ? As a quick workaround, I locally added a "add_definitions(-DHAVE_CONFIG_H) to FindDCMTK.cmake. The good news is that more recent DCMTK won't have that issue I think.

(3) Mickael Onken from Offis (DCMTK folks) is working on integrating my last patches into DCMTK allowing to get rid of FindDCMTK.cmake.

(4) Is there a way for me to install ITKv4 and CTK package from debian-testing on my Ubuntu 13.10 ? By using an alternative source ?

domibel

domibel

2013-11-12 19:22

developer   ~0010309

Regarding curl, you might need those patches. (Taken from my old Slicer3 package)

-find_package(SLICERLIBCURL REQUIRED)
-include(${SLICERLIBCURL_USE_FILE})
+find_package(CURL REQUIRED)
+include_directories(${CURL_INCLUDE_DIRS})

  • ${SLICERLIBCURL_LIBRARIES} ITKIO MRMLIDIO)
  • ${CURL_LIBRARIES} ITKIO MRMLIDIO)

-#include <slicerlibcurl/slicerlibcurl.h>
+#include <curl/curl.h>

(2)
Debian testing doesn't contain the newest version yet, but it will soon.

(4)
The source would be the same, but you have to generate the right binaries which might be incompatible with 1310.

dget http://http.debian.net/debian/pool/main/c/ctk/ctk_0.1.0+git20131105~b8307961b6-2.dsc
cd ctk-0.1.0+git20131105~b8307961b6
debuild

#same with itk4:
dget http://http.debian.net/debian/pool/main/i/insighttoolkit4/insighttoolkit4_4.4.2-4.dsc
cd insight....
debuild

but 1310 might have already a working ITK version , just type aptitude install libinsighttoolkit4-dev

jcfr

jcfr

2013-11-15 19:41

administrator   ~0010318

In my updated topic [1] there is now a new option Slicer_USE_SYSTEM_curl. It also now build the regular curl source that are now CMake'ified.

What is next:

  • Update CTK build system to also support the "CTK_USESYSTEM*" variable
  • Add support for Slicer_USE_SYSTEM(ITK,VTK,CTK) (Currently through a fatal error message if used)

When this topic will be integrated. You shouldn't have to do any thing crazy to have Slicer built and be ready for debian packaging :)

[1] https://github.com/jcfr/Slicer/tree/1739-support-use-system-option

jcfr

jcfr

2013-11-23 22:12

administrator   ~0010371

Fixed in r22724
See http://viewvc.slicer.org/viewvc.cgi/Slicer4?view=revision&amp;revision=22724

// ---------------------------------
COMP: Support Slicer_USESYSTEM* option. Fixes 0001739

This commit implements four main changes:

(1) it updates Slicer build system to support configuring Slicer passing
Slicer_USESYSTEM* CMake variables

(2) it updates to a newer version of CTK able to understand CTK_USESYSTEM*
options. List of CTK contribution associated with this update are
reported below.

(3) it changes curl library from "slicerlibcurl/cmcurl/curl" v7.12.1
to the more recent official CMake'ified curl v7.33.0. This has the
benefit of making it easier to build against the corresponding
system library.

(4) It implements workaround allowing some CLIs to built on Debian-like
distribution that is providing DCMTK 3.6.0.
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637687
EMSegment project has also been updated to implement a similar
workaround.

The macro "SlicerMacroCheckExternalProjectDependency" allowing to
recursively traverse the external project dependency tree has been
updated.

The traversal is now done in two passes. The first pass traverses the
complete tree to set the value of Slicer_USESYSTEM*.

The second pass invokes the "ExternalProject_Add" function and displays
informative messages. In addition to the usual "[OK]" and "[INCLUDED]"
suffixes, an additional text "(SYSTEM)" is displayed. It means the
corresponding libraries (and headers) installed on the system will be
used.

On Ubuntu 13.10, support for the following options have been
tested simultaneously:
-DSlicer_USE_PYTHONQT_WITH_OPENSSL:BOOL=ON
-DSlicer_USE_SYSTEM_python:BOOL=ON
-DSlicer_USE_SYSTEM_DCMTK:BOOL=ON
-DSlicer_USE_SYSTEM_LibArchive:BOOL=ON
-DSlicer_USE_SYSTEM_curl:BOOL=ON
-DSlicer_USE_SYSTEM_teem:BOOL=ON
-DSlicer_USE_SYSTEM_OpenIGTLink:BOOL=ON
-DSlicer_USE_SYSTEM_OpenSSL:BOOL=ON # Implicitly set because python depends

on OpenSSL.

-DSlicer_BUILD_OpenIGTLinkIF:BOOL=OFF # Only openigtlink version1 are available

and code does NOT supports only v2.

To successfully build Slicer against system libraries, the corresponding
packages have been installed:
sudo apt-get install libssl-dev \
libdcmtk-dev \
libarchive-dev \
libpython2.7-dev \
python-numpy \
libcurl4-openssl-dev \
libteem-dev \
tk-dev \
tcl-dev \
itcl3-dev \
libopenigtlink1-dev

While not tested, support for the following option has also been
implemented:
-DSlicer_USE_SYSTEM_ITKv4:BOOL=ON
-DSlicer_USE_SYSTEM_VTK:BOOL=ON

CTK updates:

$ git shortlog 91cdf9e0f...02ecc27d0

Jean-Christophe Fillion-Robin (39):
Ensure CTK_INSTALL_QTPLUGIN_DIR is properly set
Ensure "CMAKE_INSTALL_PREFIX" is properly passed to inner project.
By default, do not install application headers
Install CTK's .cmake files
Merge branch '65-packaging-support' into 403-relocatable-ctkconfig-usectk
Set plugin install rules for target and include files
Remove commented code and unused vars from CTKConfig / CTKGenerateCTKConfig
Explicitly set default value for CTK_INSTALL_QTPLUGIN_DIR
Remove explicit setting of CMake policies.
Improve FindDCMTK.cmake documentation
Add DCMTK 3.6.0 support to ctkDICOMUtil.cpp
Ensure DCMTK libraries can be found on system without setting DCMTK_DIR
FindDCMTK - Workaround bug in packaging of DCMTK 3.6.0 on Debian.
Add support for install-able and relocatable package.
Merge branch '382-fix-find-dcmtk-issue'
Merge branch '403-relocatable-ctkconfig-usectk'
Merge branch '405-support-dcmtk-360'
Fix -Wunused-but-set-variable in transfer function tests
Merge branch '209-fix-vtk-transfer-function-test-warnings'
Fix linking of VTKCoreCppTest by adding a check for linker capabilities
Merge branch 'fix-vtk-core-test-link-error'
COMP: FindDCMTK - Exclude -D from DCMTK_DEFINITIONS for easier re-use
Merge branch '382-fix-find-dcmtk-issue'
Associate DCMTK_DEFINITIONS to CTKDICOMCore
Merge branch '413-associated-dcmtk-definitions-to-ctkdicomcore'
Merge pull request 0000410 from NifTK/409-widgets-on-ctkPopupWidget-do-not-get-keyboard-focus
Add DCMTK 3.6.0 support to CTK application.
Merge branch '405-support-dcmtk-360'
Fix configuration of CTKConfig based on DCMTK_HAVE_CONFIG_H_OPTIONAL value
Merge branch '413-associated-dcmtk-definitions-to-ctkdicomcore'
Add convenience function "ctk_list_to_string"
Automatically reformat list passed to "CTK" inner build.
COMP: Add support for CTK_USESYSTEM
options
Merge branch '418-support-use-system-option'
FindDCMTK - Do not explicitly set DCMTK_DEFINITIONS
FindDCMTK - Clean white spaces
Merge branch '382-fix-find-dcmtk-issue' into 413-associated-dcmtk-definitions-to-ctkdicomcore
Associate CTKDICOMCore with DCMTK_DEFINITIONS in build and install tree
Merge branch '413-associated-dcmtk-definitions-to-ctkdicomcore'

Miklos Espak (1):
Active window flag transferred on RequestSoftwareInputPanel event

Steve Pieper (2):
Put all tags for a given instance into a list for a single batch insert
Merge pull request 0000415 from pieper/414-batch-insert-tags
// ---------------------------------

jcfr

jcfr

2014-03-06 05:00

administrator   ~0010887

Closing resolved issues that have not been updated in more than 3 months

jcfr

jcfr

2017-06-07 23:27

administrator   ~0014566

Fix committed to 2145-support-for-installing-extension-from-file branch.

Related Changesets

Slicer: 2145-support-for-installing-extension-from-file 8c5fd778

2013-11-24 03:09:34

jcfr

Details Diff
COMP: Support Slicer_USE_SYSTEM_* option. Fixes 0001739

This commit implements four main changes:

(1) it updates Slicer build system to support configuring Slicer passing
Slicer_USE_SYSTEM_* CMake variables

(2) it updates to a newer version of CTK able to understand CTK_USE_SYSTEM_*
options. List of CTK contribution associated with this update are
reported below.

(3) it changes curl library from "slicerlibcurl/cmcurl/curl" v7.12.1
to the more recent official CMake'ified curl v7.33.0. This has the
benefit of making it easier to build against the corresponding
system library.

(4) It implements workaround allowing some CLIs to built on Debian-like
distribution that is providing DCMTK 3.6.0.
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637687
EMSegment project has also been updated to implement a similar
workaround.

The macro "SlicerMacroCheckExternalProjectDependency" allowing to
recursively traverse the external project dependency tree has been
updated.

The traversal is now done in two passes. The first pass traverses the
complete tree to set the value of Slicer_USE_SYSTEM_*.

The second pass invokes the "ExternalProject_Add" function and displays
informative messages. In addition to the usual "[OK]" and "[INCLUDED]"
suffixes, an additional text "(SYSTEM)" is displayed. It means the
corresponding libraries (and headers) installed on the system will be
used.

On Ubuntu 13.10, support for the following options have been
tested simultaneously:
-DSlicer_USE_PYTHONQT_WITH_OPENSSL:BOOL=ON
-DSlicer_USE_SYSTEM_python:BOOL=ON
-DSlicer_USE_SYSTEM_DCMTK:BOOL=ON
-DSlicer_USE_SYSTEM_LibArchive:BOOL=ON
-DSlicer_USE_SYSTEM_curl:BOOL=ON
-DSlicer_USE_SYSTEM_teem:BOOL=ON
-DSlicer_USE_SYSTEM_OpenIGTLink:BOOL=ON
-DSlicer_USE_SYSTEM_OpenSSL:BOOL=ON # Implicitly set because python depends
# on OpenSSL.
-DSlicer_BUILD_OpenIGTLinkIF:BOOL=OFF # Only openigtlink version1 are available
# and code does NOT supports only v2.

To successfully build Slicer against system libraries, the corresponding
packages have been installed:
sudo apt-get install libssl-dev \
libdcmtk-dev \
libarchive-dev \
libpython2.7-dev \
python-numpy \
libcurl4-openssl-dev \
libteem-dev \
tk-dev \
tcl-dev \
itcl3-dev \
libopenigtlink1-dev

While not tested, support for the following option has also been
implemented:
-DSlicer_USE_SYSTEM_ITKv4:BOOL=ON
-DSlicer_USE_SYSTEM_VTK:BOOL=ON

CTK updates:

$ git shortlog 91cdf9e0f...02ecc27d0

Jean-Christophe Fillion-Robin (39):
Ensure CTK_INSTALL_QTPLUGIN_DIR is properly set
Ensure "CMAKE_INSTALL_PREFIX" is properly passed to inner project.
By default, do not install application headers
Install CTK's *.cmake files
Merge branch '65-packaging-support' into 403-relocatable-ctkconfig-usectk
Set plugin install rules for target and include files
Remove commented code and unused vars from CTKConfig / CTKGenerateCTKConfig
Explicitly set default value for CTK_INSTALL_QTPLUGIN_DIR
Remove explicit setting of CMake policies.
Improve FindDCMTK.cmake documentation
Add DCMTK 3.6.0 support to ctkDICOMUtil.cpp
Ensure DCMTK libraries can be found on system without setting DCMTK_DIR
FindDCMTK - Workaround bug in packaging of DCMTK 3.6.0 on Debian.
Add support for install-able and relocatable package.
Merge branch '382-fix-find-dcmtk-issue'
Merge branch '403-relocatable-ctkconfig-usectk'
Merge branch '405-support-dcmtk-360'
Fix -Wunused-but-set-variable in transfer function tests
Merge branch '209-fix-vtk-transfer-function-test-warnings'
Fix linking of VTKCoreCppTest by adding a check for linker capabilities
Merge branch 'fix-vtk-core-test-link-error'
COMP: FindDCMTK - Exclude -D from DCMTK_DEFINITIONS for easier re-use
Merge branch '382-fix-find-dcmtk-issue'
Associate DCMTK_DEFINITIONS to CTKDICOMCore
Merge branch '413-associated-dcmtk-definitions-to-ctkdicomcore'
Merge pull request 0000410 from NifTK/409-widgets-on-ctkPopupWidget-do-not-get-keyboard-focus
Add DCMTK 3.6.0 support to CTK application.
Merge branch '405-support-dcmtk-360'
Fix configuration of CTKConfig based on DCMTK_HAVE_CONFIG_H_OPTIONAL value
Merge branch '413-associated-dcmtk-definitions-to-ctkdicomcore'
Add convenience function "ctk_list_to_string"
Automatically reformat list passed to "CTK" inner build.
COMP: Add support for CTK_USE_SYSTEM_* options
Merge branch '418-support-use-system-option'
FindDCMTK - Do not explicitly set DCMTK_DEFINITIONS
FindDCMTK - Clean white spaces
Merge branch '382-fix-find-dcmtk-issue' into 413-associated-dcmtk-definitions-to-ctkdicomcore
Associate CTKDICOMCore with DCMTK_DEFINITIONS in build and install tree
Merge branch '413-associated-dcmtk-definitions-to-ctkdicomcore'

Miklos Espak (1):
Active window flag transferred on RequestSoftwareInputPanel event

Steve Pieper (2):
Put all tags for a given instance into a list for a single batch insert
Merge pull request 0000415 from pieper/414-batch-insert-tags

See 0001739

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22724 3bd1e089-480b-0410-8dfb-8563597acbee
mod - CMake/SlicerBlockCTKAppLauncherSettings.cmake Diff File
mod - CMake/SlicerCPack.cmake Diff File
mod - CMake/SlicerConfig.cmake.in Diff File
mod - CMake/SlicerGenerateSlicerConfig.cmake Diff File
mod - CMake/SlicerMacroCheckExternalProjectDependency.cmake Diff File
mod - CMakeLists.txt Diff File
mod - Libs/RemoteIO/CMakeLists.txt Diff File
mod - Libs/RemoteIO/vtkHTTPHandler.h Diff File
mod - Modules/CLI/DiffusionWeightedVolumeMasking/DiffusionWeightedVolumeMasking.cxx Diff File
mod - Modules/CLI/MIDASApplications/DownloadSlicerTutorials/CMakeLists.txt Diff File
mod - Modules/CLI/MIDASApplications/DownloadSlicerTutorials/DownloadSlicerTutorials.cxx Diff File
mod - Modules/CLI/PETStandardUptakeValueComputation/PETStandardUptakeValueComputation.cxx Diff File
mod - Modules/CLI/PETStandardUptakeValueComputation/itkDCMTKFileReader.cxx Diff File
mod - Modules/CLI/PETStandardUptakeValueComputation/itkDCMTKFileReader.h Diff File
mod - SuperBuild.cmake Diff File
mod - SuperBuild/External_BRAINSTools.cmake Diff File
mod - SuperBuild/External_BatchMake.cmake Diff File
mod - SuperBuild/External_CTK.cmake Diff File
mod - SuperBuild/External_CTKAPPLAUNCHER.cmake Diff File
mod - SuperBuild/External_DCMTK.cmake Diff File
mod - SuperBuild/External_EMSegment.cmake Diff File
mod - SuperBuild/External_ITKv3.cmake Diff File
mod - SuperBuild/External_ITKv4.cmake Diff File
mod - SuperBuild/External_LibArchive.cmake Diff File
mod - SuperBuild/External_MultiVolumeExplorer.cmake Diff File
mod - SuperBuild/External_MultiVolumeImporter.cmake Diff File
mod - SuperBuild/External_NUMPY.cmake Diff File
mod - SuperBuild/External_OpenIGTLink.cmake Diff File
mod - SuperBuild/External_OpenIGTLinkIF.cmake Diff File
mod - SuperBuild/External_OpenSSL.cmake Diff File
mod - SuperBuild/External_PCRE.cmake Diff File
mod - SuperBuild/External_SciPy.cmake Diff File
mod - SuperBuild/External_SimpleFilters.cmake Diff File
mod - SuperBuild/External_SimpleITK.cmake Diff File
mod - SuperBuild/External_SlicerExecutionModel.cmake Diff File
mod - SuperBuild/External_Swig.cmake Diff File
mod - SuperBuild/External_VTK.cmake Diff File
rm - SuperBuild/External_cmcurl.cmake Diff File
add - SuperBuild/External_curl.cmake Diff File
mod - SuperBuild/External_incrTcl.cmake Diff File
mod - SuperBuild/External_jqPlot.cmake Diff File
mod - SuperBuild/External_python.cmake Diff File
mod - SuperBuild/External_qRestAPI.cmake Diff File
mod - SuperBuild/External_teem.cmake Diff File
mod - SuperBuild/External_tk.cmake Diff File
mod - SuperBuild/External_zlib.cmake Diff File

Import 2017-06-07 23:51:09: master 8c5fd778

2013-11-24 03:09:34

jcfr

Details Diff
COMP: Support Slicer_USE_SYSTEM_* option. Fixes 0001739

This commit implements four main changes:

(1) it updates Slicer build system to support configuring Slicer passing
Slicer_USE_SYSTEM_* CMake variables

(2) it updates to a newer version of CTK able to understand CTK_USE_SYSTEM_*
options. List of CTK contribution associated with this update are
reported below.

(3) it changes curl library from "slicerlibcurl/cmcurl/curl" v7.12.1
to the more recent official CMake'ified curl v7.33.0. This has the
benefit of making it easier to build against the corresponding
system library.

(4) It implements workaround allowing some CLIs to built on Debian-like
distribution that is providing DCMTK 3.6.0.
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=637687
EMSegment project has also been updated to implement a similar
workaround.

The macro "SlicerMacroCheckExternalProjectDependency" allowing to
recursively traverse the external project dependency tree has been
updated.

The traversal is now done in two passes. The first pass traverses the
complete tree to set the value of Slicer_USE_SYSTEM_*.

The second pass invokes the "ExternalProject_Add" function and displays
informative messages. In addition to the usual "[OK]" and "[INCLUDED]"
suffixes, an additional text "(SYSTEM)" is displayed. It means the
corresponding libraries (and headers) installed on the system will be
used.

On Ubuntu 13.10, support for the following options have been
tested simultaneously:
-DSlicer_USE_PYTHONQT_WITH_OPENSSL:BOOL=ON
-DSlicer_USE_SYSTEM_python:BOOL=ON
-DSlicer_USE_SYSTEM_DCMTK:BOOL=ON
-DSlicer_USE_SYSTEM_LibArchive:BOOL=ON
-DSlicer_USE_SYSTEM_curl:BOOL=ON
-DSlicer_USE_SYSTEM_teem:BOOL=ON
-DSlicer_USE_SYSTEM_OpenIGTLink:BOOL=ON
-DSlicer_USE_SYSTEM_OpenSSL:BOOL=ON # Implicitly set because python depends
# on OpenSSL.
-DSlicer_BUILD_OpenIGTLinkIF:BOOL=OFF # Only openigtlink version1 are available
# and code does NOT supports only v2.

To successfully build Slicer against system libraries, the corresponding
packages have been installed:
sudo apt-get install libssl-dev \
libdcmtk-dev \
libarchive-dev \
libpython2.7-dev \
python-numpy \
libcurl4-openssl-dev \
libteem-dev \
tk-dev \
tcl-dev \
itcl3-dev \
libopenigtlink1-dev

While not tested, support for the following option has also been
implemented:
-DSlicer_USE_SYSTEM_ITKv4:BOOL=ON
-DSlicer_USE_SYSTEM_VTK:BOOL=ON

CTK updates:

$ git shortlog 91cdf9e0f...02ecc27d0

Jean-Christophe Fillion-Robin (39):
Ensure CTK_INSTALL_QTPLUGIN_DIR is properly set
Ensure "CMAKE_INSTALL_PREFIX" is properly passed to inner project.
By default, do not install application headers
Install CTK's *.cmake files
Merge branch '65-packaging-support' into 403-relocatable-ctkconfig-usectk
Set plugin install rules for target and include files
Remove commented code and unused vars from CTKConfig / CTKGenerateCTKConfig
Explicitly set default value for CTK_INSTALL_QTPLUGIN_DIR
Remove explicit setting of CMake policies.
Improve FindDCMTK.cmake documentation
Add DCMTK 3.6.0 support to ctkDICOMUtil.cpp
Ensure DCMTK libraries can be found on system without setting DCMTK_DIR
FindDCMTK - Workaround bug in packaging of DCMTK 3.6.0 on Debian.
Add support for install-able and relocatable package.
Merge branch '382-fix-find-dcmtk-issue'
Merge branch '403-relocatable-ctkconfig-usectk'
Merge branch '405-support-dcmtk-360'
Fix -Wunused-but-set-variable in transfer function tests
Merge branch '209-fix-vtk-transfer-function-test-warnings'
Fix linking of VTKCoreCppTest by adding a check for linker capabilities
Merge branch 'fix-vtk-core-test-link-error'
COMP: FindDCMTK - Exclude -D from DCMTK_DEFINITIONS for easier re-use
Merge branch '382-fix-find-dcmtk-issue'
Associate DCMTK_DEFINITIONS to CTKDICOMCore
Merge branch '413-associated-dcmtk-definitions-to-ctkdicomcore'
Merge pull request 0000410 from NifTK/409-widgets-on-ctkPopupWidget-do-not-get-keyboard-focus
Add DCMTK 3.6.0 support to CTK application.
Merge branch '405-support-dcmtk-360'
Fix configuration of CTKConfig based on DCMTK_HAVE_CONFIG_H_OPTIONAL value
Merge branch '413-associated-dcmtk-definitions-to-ctkdicomcore'
Add convenience function "ctk_list_to_string"
Automatically reformat list passed to "CTK" inner build.
COMP: Add support for CTK_USE_SYSTEM_* options
Merge branch '418-support-use-system-option'
FindDCMTK - Do not explicitly set DCMTK_DEFINITIONS
FindDCMTK - Clean white spaces
Merge branch '382-fix-find-dcmtk-issue' into 413-associated-dcmtk-definitions-to-ctkdicomcore
Associate CTKDICOMCore with DCMTK_DEFINITIONS in build and install tree
Merge branch '413-associated-dcmtk-definitions-to-ctkdicomcore'

Miklos Espak (1):
Active window flag transferred on RequestSoftwareInputPanel event

Steve Pieper (2):
Put all tags for a given instance into a list for a single batch insert
Merge pull request 0000415 from pieper/414-batch-insert-tags

See 0001739

git-svn-id: http://svn.slicer.org/Slicer4/trunk@22724 3bd1e089-480b-0410-8dfb-8563597acbee
mod - CMake/SlicerBlockCTKAppLauncherSettings.cmake Diff File
mod - CMake/SlicerCPack.cmake Diff File
mod - CMake/SlicerConfig.cmake.in Diff File
mod - CMake/SlicerGenerateSlicerConfig.cmake Diff File
mod - CMake/SlicerMacroCheckExternalProjectDependency.cmake Diff File
mod - CMakeLists.txt Diff File
mod - Libs/RemoteIO/CMakeLists.txt Diff File
mod - Libs/RemoteIO/vtkHTTPHandler.h Diff File
mod - Modules/CLI/DiffusionWeightedVolumeMasking/DiffusionWeightedVolumeMasking.cxx Diff File
mod - Modules/CLI/MIDASApplications/DownloadSlicerTutorials/CMakeLists.txt Diff File
mod - Modules/CLI/MIDASApplications/DownloadSlicerTutorials/DownloadSlicerTutorials.cxx Diff File
mod - Modules/CLI/PETStandardUptakeValueComputation/PETStandardUptakeValueComputation.cxx Diff File
mod - Modules/CLI/PETStandardUptakeValueComputation/itkDCMTKFileReader.cxx Diff File
mod - Modules/CLI/PETStandardUptakeValueComputation/itkDCMTKFileReader.h Diff File
mod - SuperBuild.cmake Diff File
mod - SuperBuild/External_BRAINSTools.cmake Diff File
mod - SuperBuild/External_BatchMake.cmake Diff File
mod - SuperBuild/External_CTK.cmake Diff File
mod - SuperBuild/External_CTKAPPLAUNCHER.cmake Diff File
mod - SuperBuild/External_DCMTK.cmake Diff File
mod - SuperBuild/External_EMSegment.cmake Diff File
mod - SuperBuild/External_ITKv3.cmake Diff File
mod - SuperBuild/External_ITKv4.cmake Diff File
mod - SuperBuild/External_LibArchive.cmake Diff File
mod - SuperBuild/External_MultiVolumeExplorer.cmake Diff File
mod - SuperBuild/External_MultiVolumeImporter.cmake Diff File
mod - SuperBuild/External_NUMPY.cmake Diff File
mod - SuperBuild/External_OpenIGTLink.cmake Diff File
mod - SuperBuild/External_OpenIGTLinkIF.cmake Diff File
mod - SuperBuild/External_OpenSSL.cmake Diff File
mod - SuperBuild/External_PCRE.cmake Diff File
mod - SuperBuild/External_SciPy.cmake Diff File
mod - SuperBuild/External_SimpleFilters.cmake Diff File
mod - SuperBuild/External_SimpleITK.cmake Diff File
mod - SuperBuild/External_SlicerExecutionModel.cmake Diff File
mod - SuperBuild/External_Swig.cmake Diff File
mod - SuperBuild/External_VTK.cmake Diff File
rm - SuperBuild/External_cmcurl.cmake Diff File
add - SuperBuild/External_curl.cmake Diff File
mod - SuperBuild/External_incrTcl.cmake Diff File
mod - SuperBuild/External_jqPlot.cmake Diff File
mod - SuperBuild/External_python.cmake Diff File
mod - SuperBuild/External_qRestAPI.cmake Diff File
mod - SuperBuild/External_teem.cmake Diff File
mod - SuperBuild/External_tk.cmake Diff File
mod - SuperBuild/External_zlib.cmake Diff File

Issue History

Date Modified Username Field Change
2012-02-21 06:16 jcfr New Issue
2012-02-21 06:16 jcfr Status new => assigned
2012-02-21 06:16 jcfr Assigned To => jcfr
2012-02-21 06:16 jcfr Reporter jcfr => domibel
2012-08-21 12:01 jcfr Target Version => Slicer 4.3.0
2013-06-04 06:24 jcfr Note Added: 0008701
2013-07-31 18:52 jcfr Relationship added related to 0003268
2013-07-31 18:52 jcfr Priority normal => low
2013-08-19 06:58 jcfr Target Version Slicer 4.3.0 => Slicer 4.4.0
2013-08-19 07:25 domibel Note Added: 0009508
2013-08-19 07:25 jcfr Priority low => high
2013-08-19 07:26 jcfr Severity minor => feature
2013-08-19 07:26 jcfr Note Added: 0009509
2013-08-19 07:26 jcfr Note Edited: 0009509
2013-11-07 15:46 domibel Note Added: 0010294
2013-11-11 22:25 jcfr Note Added: 0010306
2013-11-12 10:57 domibel Note Added: 0010307
2013-11-12 11:17 jcfr Note Added: 0010308
2013-11-12 19:22 domibel Note Added: 0010309
2013-11-15 19:41 jcfr Note Added: 0010318
2013-11-23 22:12 jcfr Note Added: 0010371
2013-11-23 22:12 jcfr Status assigned => resolved
2013-11-23 22:12 jcfr Fixed in Version => Slicer 4.4.0
2013-11-23 22:12 jcfr Resolution open => fixed
2014-03-06 05:00 jcfr Note Added: 0010887
2014-03-06 05:01 jcfr Status resolved => closed
2017-06-07 23:27 jcfr Changeset attached => Slicer 2145-support-for-installing-extension-from-file 8c5fd778
2017-06-07 23:27 jcfr Note Added: 0014566
2017-06-10 08:51 jcfr Changeset attached => Slicer master 8c5fd778