File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -350,7 +350,11 @@ macro (find_or_download_fmt)
350
350
endif ()
351
351
set (FMT_INCLUDE_DIR "${FMT_INSTALL_DIR} /include" )
352
352
set (OIIO_USING_FMT_LOCAL TRUE )
353
- file (STRINGS "${FMT_INCLUDE_DIR} /fmt/core.h" TMP REGEX "^#define FMT_VERSION .*$" )
353
+ if (EXISTS "${FMT_INCLUDE_DIR} /fmt/base.h" )
354
+ file (STRINGS "${FMT_INCLUDE_DIR} /fmt/base.h" TMP REGEX "^#define FMT_VERSION .*$" )
355
+ else ()
356
+ file (STRINGS "${FMT_INCLUDE_DIR} /fmt/core.h" TMP REGEX "^#define FMT_VERSION .*$" )
357
+ endif ()
354
358
string (REGEX MATCHALL "[0-9]+" FMT_VERSION_NUMERIC ${TMP} )
355
359
math (EXPR FMT_VERSION_PATCH "${FMT_VERSION_NUMERIC} % 100" )
356
360
math (EXPR FMT_VERSION_MINOR "(${FMT_VERSION_NUMERIC} / 100) % 100" )
Original file line number Diff line number Diff line change @@ -69,6 +69,9 @@ if (INTERNALIZE_FMT OR OIIO_USING_FMT_LOCAL)
69
69
if (fmt_VERSION VERSION_GREATER_EQUAL 9 )
70
70
list (APPEND fmt_headers_base_names std.h )
71
71
endif ()
72
+ if (EXISTS "${FMT_INCLUDE_DIR} /fmt/base.h" )
73
+ list (APPEND fmt_headers_base_names base.h )
74
+ endif ()
72
75
set (fmt_internal_directory ${CMAKE_BINARY_DIR} /include/OpenImageIO/detail/fmt )
73
76
list (TRANSFORM fmt_headers_base_names
74
77
PREPEND ${FMT_INCLUDE_DIR} /fmt/
You can’t perform that action at this time.
0 commit comments