Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
medicalphysics committed Nov 10, 2019
2 parents 8e684f9 + 53151f7 commit 8c76df7
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions src/opendxmc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,31 @@ if (WIN32)
endif(WIN32)


##adding gdcm dependency if installed
FIND_PACKAGE(GDCM)
IF(GDCM_FOUND)
INCLUDE(${GDCM_USE_FILE})
get_filename_component(GDCM_MAIN_DIR "${GDCM_LIBRARY_DIRS}/.." ABSOLUTE)
if (WIN32)
add_custom_target(gdcmdeploy ALL)
set(libnames "gdcmMSFF" "gdcmDSED" "gdcmCommon"
"gdcmjpeg8" "gdcmDICT" "gdcmjpeg12" "gdcmIOD"
"gdcmjpeg16" "gdcmopenjp2" "gdcmzlib"
"gdcmcharls" "gdcmexpat" "gdcmmd5")
foreach(libname ${libnames})
set(libpath "${GDCM_MAIN_DIR}/bin/${libname}.dll")
set(outpath "${CMAKE_BINARY_DIR}/${PROJECT_NAME}/${libname}.dll")
add_custom_command(TARGET gdcmdeploy POST_BUILD
COMMENT "Copying GDCM dll ${libpath} to ${outpath}"
DEPENDS ${libpath}
COMMAND ${CMAKE_COMMAND} -E copy_if_different
${libpath}
${outpath}
)
endforeach()
endif(WIN32)
ENDIF(GDCM_FOUND)



#Copying application resources
Expand Down

0 comments on commit 8c76df7

Please sign in to comment.