mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-02 04:04:19 +00:00
Fix cmake build for old versions (#8173)
Adresses all these issues -> https://github.com/google/flatbuffers/issues/7994 https://github.com/google/flatbuffers/issues/7979 https://github.com/google/flatbuffers/issues/8049 Fix 7994, Fix 7979, Fix 8049 Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
@@ -556,7 +556,7 @@ if(FLATBUFFERS_BUILD_TESTS)
|
||||
|
||||
# Add a library so there is a single target that the generated samples can
|
||||
# link too.
|
||||
if(MSVC)
|
||||
if(MSVC OR ${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.20.0")
|
||||
add_library(flatsample INTERFACE)
|
||||
else()
|
||||
add_library(flatsample STATIC)
|
||||
|
||||
Reference in New Issue
Block a user