Commit ee47453f authored by Jean-Loup Haberbusch's avatar Jean-Loup Haberbusch

Merge branch 'bug/GDCM-File-not-found' into 'develop'

Bug/gdcm file not found

See merge request !135
parents 8c0413db 7c83b24e
......@@ -360,37 +360,32 @@ macro(camitk_extension)
if(GDCM_FOUND)
include(${GDCM_USE_FILE})
if (MSVC)
set(GDCM_LIBRARIES
debug ${GDCM_DIR}/../gdcmcharls${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmCommon${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmDICT${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmDSED${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmexpat${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmgetopt${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmIOD${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmjpeg8${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmjpeg12${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmjpeg16${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmMEXD${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmMSFF${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmopenjpeg${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmzlib${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../socketxx${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../vtkgdcm${CAMITK_DEBUG_POSTFIX}.lib
debug ${GDCM_DIR}/../gdcmDSED${CAMITK_DEBUG_POSTFIX}.lib
optimized gdcmcharls gdcmCommon gdcmDICT gdcmDSED gdcmexpat
optimized gdcmgetopt gdcmIOD gdcmjpeg8 gdcmjpeg12 gdcmjpeg16
optimized gdcmMEXD gdcmMSFF gdcmopenjpeg gdcmzlib socketxx vtkgdcm
optimized gdcmDSED
# List all available GDCM library files
file(GLOB GDCM_LIB_FILES
LIST_DIRECTORIES false
"${GDCM_DIR}/../*${CAMITK_DEBUG_POSTFIX}.lib"
)
unset(GDCM_LIBRARIES)
foreach(GDCM_LIB_FILE ${GDCM_LIB_FILES})
# Get the actual name of the library
string(REGEX REPLACE "^.*/(.*)${CAMITK_DEBUG_POSTFIX}.lib"
"\\1" GDCM_LIB_FILE_OPTIMIZED
"${GDCM_LIB_FILE}")
# Add both debug and optimized version
set(GDCM_LIBRARIES ${GDCM_LIBRARIES} debug ${GDCM_LIB_FILE}
optimized ${GDCM_LIB_FILE_OPTIMIZED})
endforeach()
else()
set(GDCM_LIBRARIES gdcmCommon gdcmDICT gdcmDSED gdcmMEXD gdcmMSFF vtkgdcm)
endif()
else()
message(ERROR "${EXTENSION_NAME}: GDCM 2.x library required. Please install GDCM.")
message(ERROR "${EXTENSION_NAME}: GDCM 2.x or above library required. Please install GDCM.")
endif()
endif()
# EXTERNAL LIBRARIES
set(EXTERNAL_LIBRARIES)
if(${EXTENSION_NAME_CMAKE}_EXTERNAL_LIBRARIES)
......
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