commit | c6f9e010bb0e284acb04776a07e140951ff5b7cb | [log] [tgz] |
---|---|---|
author | Felix <hi@l33t.name> | Thu Nov 23 01:32:02 2023 +0100 |
committer | GitHub <noreply@github.com> | Wed Nov 22 19:32:02 2023 -0500 |
tree | 043bc1563c62255636d1efaeae6619d24b1b3fa6 | |
parent | 94ff188a3ebdb62a3200944274153c130637f8b7 [diff] |
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>
diff --git a/CMakeLists.txt b/CMakeLists.txt index ab69955..c036885 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -556,7 +556,7 @@ # 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)