Skip to content

Commit 2897ef0

Browse files
committed
libfmt fix for cmake <3.0
this is CentOOOOOOS 7
1 parent f933975 commit 2897ef0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmake/libfmt.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ MACRO(BUNDLE_LIBFMT)
88
SET(dir "${CMAKE_BINARY_DIR}/extra/libfmt")
99
SET(LIBFMT_INCLUDE_DIR "${dir}/src/libfmt/include")
1010

11+
IF(CMAKE_VERSION VERSION_GREATER "3.0")
12+
SET(fmt_byproducts BUILD_BYPRODUCTS ${LIBFMT_INCLUDE_DIR}/fmt/format-inl.h)
13+
ENDIF()
14+
1115
ExternalProject_Add(
1216
libfmt
1317
PREFIX "${dir}"
@@ -16,7 +20,7 @@ MACRO(BUNDLE_LIBFMT)
1620
INSTALL_COMMAND ""
1721
CONFIGURE_COMMAND ""
1822
BUILD_COMMAND ""
19-
BUILD_BYPRODUCTS ${LIBFMT_INCLUDE_DIR}/fmt/format-inl.h
23+
${fmt_byproducts}
2024
)
2125
ENDMACRO()
2226

0 commit comments

Comments
 (0)