-#=========================================================
-# Building in the source tree is forbidden
-IF(PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR})
- MESSAGE(FATAL_ERROR "Building in the source tree is not allowed ! Quit; remove the file 'CMakeCache.txt' and the folder 'CMakeFiles' an
-d build outside the sources (for example 'mkdir build ; cmake <CLITK_DIR>'.")
-ENDIF(PROJECT_BINARY_DIR STREQUAL ${PROJECT_SOURCE_DIR})
-#=========================================================
+if(${CLITK_USE_PACS_CONNECTION})
+ set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -lgdcmMEXD" )
+endif(${CLITK_USE_PACS_CONNECTION})