Mercurial > hg > orthanc
comparison OrthancFramework/Resources/CMake/DcmtkConfigurationStatic-3.6.7.cmake @ 5075:a342e561c29d
fix MSVC2008 build
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 16 Aug 2022 12:46:46 +0200 |
parents | b23a4bb18065 |
children | 0ea402b4d901 |
comparison
equal
deleted
inserted
replaced
5074:fa3699115b48 | 5075:a342e561c29d |
---|---|
62 | 62 |
63 if (Failure) | 63 if (Failure) |
64 message(FATAL_ERROR "Error while patching a file") | 64 message(FATAL_ERROR "Error while patching a file") |
65 endif() | 65 endif() |
66 | 66 |
67 if (MSVC) | |
68 # Older versions of Microsoft Visual Studio (notably MSVC2008) | |
69 # don't like void usage of function arguments in C source files, | |
70 # in order to avoid a warning about unused arguments. This patch | |
71 # removes such usages that were not present in DCMTK <= 3.6.6. | |
72 execute_process( | |
73 COMMAND ${PATCH_EXECUTABLE} -p0 -N -i | |
74 ${CMAKE_CURRENT_LIST_DIR}/../Patches/dcmtk-3.6.7-visual-studio.patch | |
75 WORKING_DIRECTORY ${CMAKE_BINARY_DIR} | |
76 RESULT_VARIABLE Failure | |
77 ) | |
78 | |
79 if (Failure) | |
80 message(FATAL_ERROR "Error while patching a file") | |
81 endif() | |
82 endif() | |
83 | |
67 configure_file( | 84 configure_file( |
68 ${CMAKE_CURRENT_LIST_DIR}/../Patches/dcmtk-dcdict_orthanc.cc | 85 ${CMAKE_CURRENT_LIST_DIR}/../Patches/dcmtk-dcdict_orthanc.cc |
69 ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/dcdict_orthanc.cc | 86 ${DCMTK_SOURCES_DIR}/dcmdata/libsrc/dcdict_orthanc.cc |
70 COPYONLY) | 87 COPYONLY) |
71 else() | 88 else() |