mirror of
https://github.com/google/flatbuffers.git
synced 2026-06-14 08:26:59 +00:00
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:
committed by
GitHub
parent
4c514483d8
commit
728c033ad6
@@ -125,6 +125,13 @@ if(NOT DEFINED FLATBUFFERS_LOCALE_INDEPENDENT)
|
||||
endif()
|
||||
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
|
||||
include/flatbuffers/allocator.h
|
||||
include/flatbuffers/array.h
|
||||
|
||||
Reference in New Issue
Block a user