1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 02:32:36 +01:00

build/cmake: unbreak USE_SYSTEM_FLATBUFFERS after bec0b6e8c3

-- Checking for module 'flatbuffers>=2.0.0'
--   Found flatbuffers, version 2.0.6
CMake Error at 3rdparty/CMakeLists.txt:24 (message):
  Flatbuffers flatc execute failed with: ''
This commit is contained in:
Jan Beich 2022-05-25 23:12:20 +00:00 committed by Megamouse
parent 345bda69ec
commit cc150cc2c6

View File

@ -19,9 +19,9 @@ if (USE_SYSTEM_FLATBUFFERS)
pkg_check_modules(FLATBUFFERS REQUIRED IMPORTED_TARGET flatbuffers>=2.0.0)
target_link_libraries(3rdparty_flatbuffers INTERFACE PkgConfig::FLATBUFFERS)
set(FBS_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../rpcs3/Emu/NP/generated/")
execute_process(COMMAND "flatc --cpp -o ${FBS_DIR} ${FBS_DIR}/np2_structs.fbs" RESULT_VARIABLE FBS_CMD_ERROR)
execute_process(COMMAND flatc --cpp -o "${FBS_DIR}" "${FBS_DIR}/np2_structs.fbs" RESULT_VARIABLE FBS_CMD_ERROR)
if(FBS_CMD_ERROR AND NOT FBS_CMD_ERROR EQUAL 0)
message(FATAL_ERROR "Flatbuffers flatc execute failed with: '${STATUS}'")
message(FATAL_ERROR "flatc failed to regenerate flatbuffers headers.")
endif()
else()
target_include_directories(3rdparty_flatbuffers INTERFACE flatbuffers/include)