diff --git a/CMakeLists.txt b/CMakeLists.txt index 779558ea787..395ac59e7c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,6 +125,13 @@ if(NOT DEFINED FLATBUFFERS_LOCALE_INDEPENDENT) endif() add_definitions(-DFLATBUFFERS_LOCALE_INDEPENDENT=$) +if(NOT WIN32) + check_symbol_exists(realpath "stdlib.h" HAVE_REALPATH) + if(NOT HAVE_REALPATH) + add_definitions(-DFLATBUFFERS_NO_ABSOLUTE_PATH_RESOLUTION) + endif() +endif() + set(FlatBuffers_Library_SRCS include/flatbuffers/allocator.h include/flatbuffers/array.h