Add check for presence of realpath to CMakeLists.txt to support more platforms (#7603)
* add automatic check for realpath in CMakeLists * added win32 check Co-authored-by: Derek Bailey <derekbailey@google.com>
This commit is contained in:
parent
4c514483d8
commit
728c033ad6
|
@ -125,6 +125,13 @@ if(NOT DEFINED FLATBUFFERS_LOCALE_INDEPENDENT)
|
||||||
endif()
|
endif()
|
||||||
add_definitions(-DFLATBUFFERS_LOCALE_INDEPENDENT=$<BOOL:${FLATBUFFERS_LOCALE_INDEPENDENT}>)
|
add_definitions(-DFLATBUFFERS_LOCALE_INDEPENDENT=$<BOOL:${FLATBUFFERS_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
|
set(FlatBuffers_Library_SRCS
|
||||||
include/flatbuffers/allocator.h
|
include/flatbuffers/allocator.h
|
||||||
include/flatbuffers/array.h
|
include/flatbuffers/array.h
|
||||||
|
|
Loading…
Reference in New Issue