Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit d9e2d053 authored by saubatn's avatar saubatn
Browse files

Merge branch 'feature-27' Increase CMake documentation for finding ITK, VTK libraries.

parents b199fa51 61b2602a
......@@ -33,9 +33,8 @@ set(CAMITK_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
include(camitk/packaging/CamiTKOpenSourcePackaging)
camitk_opensource_packaging()
# Nico : test C++11
# Maybev not the best place to put it
# set(CMAKE_CXX_FLAGS "-std=c++11")
# CamiTK 4.0 is C++11 compliant
set(CMAKE_CXX_FLAGS "-std=c++11")
# Specific to SDK: first compile the SDK (it looks like a CEP but is sooooo special...)
add_subdirectory(sdk)
......
......@@ -133,8 +133,6 @@ set(CAMITK_INCLUDE_DIRECTORIES
# postfix for MSVC debug version
set(CAMITK_DEBUG_POSTFIX "-debug")
# basic list of all lib needed for linking with CamiTK core
if(MSVC)
# name of the camitk core lib
......@@ -143,6 +141,7 @@ if(MSVC)
)
# Construct list of VTK libraries for linking
# CAMITK_VTK_LIBRARIES = VTK input libraries at linkage
foreach(VTK_LIBRARY ${VTK_LIBRARIES})
# Clear some errors on VTK configuration
# rename correctly verdict -> vtkverdict library
......@@ -168,7 +167,7 @@ else()
# list of all core dependencies
set(CAMITK_LIBRARIES
${VTK_LIBRARIES}
${VTK_LIBRARIES} # no need to add more libraries in the list, CMake & VTK handle it correclty on Linux & Apple
# QVTK
qtpropertybrowser
)
......
......@@ -207,9 +207,10 @@ macro(camitk_application)
if ((${ITK_VERSION} VERSION_GREATER "4") AND (${ITK_VERSION} VERSION_LESS "5")) # ITK 4.9 on Windows, maybe a lesser version for Linux.
if(MSVC)
set(ITK_DIR ${ITK_DIR}/../..)
# Construct list of ITK libraries for linking
# Construct list of ITK libraries for linking = CAMITK_ITK_LIBRARIES
foreach(ITK_LIBRARY ${ITK_LIBRARIES})
string(SUBSTRING ${ITK_LIBRARY} 0 3 ${ITK_LIBRARY}_PREFIX)
# Some libraries have not the expected 'itk' prefix. Add it then
if((NOT ${${ITK_LIBRARY}_PREFIX} STREQUAL "itk") AND (NOT ${${ITK_LIBRARY}_PREFIX} STREQUAL "ITK"))
set(ITK_LIBRARY itk${ITK_LIBRARY})
endif()
......
......@@ -218,9 +218,10 @@ macro(camitk_extension)
if ((${ITK_VERSION} VERSION_GREATER "4") AND (${ITK_VERSION} VERSION_LESS "5")) # ITK 4.9 on Windows, maybe a lesser version for Linux.
if(MSVC)
set(ITK_DIR ${ITK_DIR}/../..)
# Construct list of ITK libraries for linking
# Construct list of ITK libraries for linking = CAMITK_ITK_LIBRARIES
foreach(ITK_LIBRARY ${ITK_LIBRARIES})
string(SUBSTRING ${ITK_LIBRARY} 0 3 ${ITK_LIBRARY}_PREFIX)
# Some libraries have not the expected 'itk' prefix. Add it then
if((NOT ${${ITK_LIBRARY}_PREFIX} STREQUAL "itk") AND (NOT ${${ITK_LIBRARY}_PREFIX} STREQUAL "ITK"))
set(ITK_LIBRARY itk${ITK_LIBRARY})
endif()
......
......@@ -184,9 +184,10 @@ macro(camitk_library)
if ((${ITK_VERSION} VERSION_GREATER "4") AND (${ITK_VERSION} VERSION_LESS "5")) # ITK 4.9 on Windows, maybe a lesser version for Linux.
if(MSVC)
set(ITK_DIR ${ITK_DIR}/../..)
# Construct list of ITK libraries for linking
# Construct list of ITK libraries for linking = CAMITK_ITK_LIBRARIES
foreach(ITK_LIBRARY ${ITK_LIBRARIES})
string(SUBSTRING ${ITK_LIBRARY} 0 3 ${ITK_LIBRARY}_PREFIX)
# Some libraries have not the expected 'itk' prefix. Add it then
if((NOT ${${ITK_LIBRARY}_PREFIX} STREQUAL "itk") AND (NOT ${${ITK_LIBRARY}_PREFIX} STREQUAL "ITK"))
set(ITK_LIBRARY itk${ITK_LIBRARY})
endif()
......
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