We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f7ff6ad + 811e72e commit ccb17dcCopy full SHA for ccb17dc
1 file changed
Modules/ThirdParty/TIFF/CMakeLists.txt
@@ -17,9 +17,14 @@ if(ITK_USE_SYSTEM_TIFF)
17
# Check availability of different methods to access TIFF's field
18
# data structure.
19
include(CheckTypeSize)
20
+ include(CheckSymbolExists)
21
set(CMAKE_REQUIRED_LIBRARIES TIFF::TIFF)
22
set(CMAKE_EXTRA_INCLUDE_FILES "tiffio.h")
- check_type_size(TIFFFieldReadCount ITK_TIFF_HAS_TIFFFieldReadCount)
23
+ # TIFFFieldReadCount is a function, not a type. Using
24
+ # check_type_size (sizeof) on a function is non-standard and fails
25
+ # on MSVC, causing the wrong code path and crashes. Use
26
+ # check_symbol_exists instead.
27
+ check_symbol_exists(TIFFFieldReadCount "tiffio.h" ITK_TIFF_HAS_TIFFFieldReadCount)
28
check_type_size(TIFFField* ITK_TIFF_HAS_TIFFField)
29
else()
30
set(ITKTIFF_INCLUDE_DIRS
0 commit comments