Commit 76be4eeb authored by jcfr's avatar jcfr

COMP: Find LibArchive/CURL/OpenIGTLink/ZLIB package where required.

This commit complements commit r23350 and will help reducing the number
of parameters passed to the compiler/linker. See #3741

git-svn-id: http://svn.slicer.org/Slicer4/trunk@23355 3bd1e089-480b-0410-8dfb-8563597acbee
parent d57a7cc7
......@@ -7,6 +7,11 @@ if(Slicer_BUILD_CLI_SUPPORT)
find_package(SlicerExecutionModel REQUIRED ModuleDescriptionParser)
endif()
#
# LibArchive
#
find_package(LibArchive REQUIRED MODULE)
# --------------------------------------------------------------------------
# Subdirectories
# --------------------------------------------------------------------------
......
......@@ -832,12 +832,6 @@ if(Slicer_USE_QtTesting)
find_package(QtTesting REQUIRED)
endif()
#-----------------------------------------------------------------------------
# ZLIB
#-----------------------------------------------------------------------------
find_package(ZLIB REQUIRED)
include_directories(${ZLIB_INCLUDE_DIRS})
#-----------------------------------------------------------------------------
# qRestAPI
#-----------------------------------------------------------------------------
......@@ -905,36 +899,12 @@ endif()
#-----------------------------------------------------------------------------
# Teem
#-----------------------------------------------------------------------------
# XXX Waiting teem provide a correct TeemConfig.cmake exporting targets, this is needed
# to ensure the link_directories for teem is defined and avoid error like:
# warning: libteem.so.1, needed by ../../../../bin/libvtkTeem.so, may conflict with libteem.so.2
find_package(Teem REQUIRED)
include(${Teem_USE_FILE})
#-----------------------------------------------------------------------------
# SlicerLibCurl
#-----------------------------------------------------------------------------
find_package(CURL REQUIRED)
include_directories(${CURL_INCLUDE_DIRS})
#-----------------------------------------------------------------------------
# LibArchive
#-----------------------------------------------------------------------------
find_package(LibArchive REQUIRED MODULE)
#-----------------------------------------------------------------------------
# BatchMake
#-----------------------------------------------------------------------------
if(Slicer_USE_BatchMake)
find_package(BatchMake REQUIRED)
include(${BatchMake_USE_FILE})
endif()
#-----------------------------------------------------------------------------
# OpenIGTLink
#-----------------------------------------------------------------------------
if(Slicer_USE_OpenIGTLink)
find_package(OpenIGTLink REQUIRED)
include(${OpenIGTLink_USE_FILE})
endif()
#-----------------------------------------------------------------------------
# SlicerExecutionModel settings
#-----------------------------------------------------------------------------
......
......@@ -11,10 +11,22 @@ if(POLICY CMP0017)
cmake_policy(SET CMP0017 OLD)
endif()
# --------------------------------------------------------------------------
# Options
# --------------------------------------------------------------------------
if(NOT DEFINED BUILD_SHARED_LIBS)
option(BUILD_SHARED_LIBS "Build with shared libraries." ON)
endif()
# --------------------------------------------------------------------------
# Dependencies
# --------------------------------------------------------------------------
#
# LibArchive
#
find_package(LibArchive REQUIRED MODULE)
# --------------------------------------------------------------------------
# Include dirs
# --------------------------------------------------------------------------
......
......@@ -11,14 +11,9 @@ if(POLICY CMP0017)
cmake_policy(SET CMP0017 OLD)
endif()
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
find_package(CURL REQUIRED)
if(Slicer_USE_PYTHONQT_WITH_OPENSSL)
find_package(OpenSSL REQUIRED)
endif()
# --------------------------------------------------------------------------
# Options
# --------------------------------------------------------------------------
# Disable MSVC 8 warnings
if(WIN32)
......@@ -34,6 +29,28 @@ if(NOT DEFINED BUILD_SHARED_LIBS)
option(BUILD_SHARED_LIBS "Build with shared libraries." ON)
endif()
# --------------------------------------------------------------------------
# Dependencies
# --------------------------------------------------------------------------
#
# VTK
#
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
#
# CURL
#
find_package(CURL REQUIRED)
#
# OpenSSL
#
if(Slicer_USE_PYTHONQT_WITH_OPENSSL)
find_package(OpenSSL REQUIRED)
endif()
# --------------------------------------------------------------------------
# Include dirs
# --------------------------------------------------------------------------
......
......@@ -6,6 +6,14 @@ if(Slicer_EP_LABEL_REMOTE_MODULE)
set(LAUNCH_EXE ${SEM_LAUNCH_COMMAND})
endif()
#
# XXX OpenIGTLink - This call to find_package should be moved into OpenIGTLinkIF
#
if(Slicer_USE_OpenIGTLink)
find_package(OpenIGTLink REQUIRED)
include(${OpenIGTLink_USE_FILE})
endif()
foreach(varname ${Slicer_EP_LABEL_REMOTE_MODULE})
set(_source_dir ${${varname}})
get_filename_component(_project_name ${_source_dir} NAME_WE)
......
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