From bec0b6e8c33d16efb7e9ac58cbd34633f098377d Mon Sep 17 00:00:00 2001 From: RipleyTom Date: Sat, 14 May 2022 18:47:45 +0200 Subject: [PATCH] Add regeneration for system flatbuffers users --- 3rdparty/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt index 0ce414a0cc..d3928cb096 100644 --- a/3rdparty/CMakeLists.txt +++ b/3rdparty/CMakeLists.txt @@ -18,6 +18,11 @@ add_library(3rdparty_flatbuffers INTERFACE) 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) + if(FBS_CMD_ERROR AND NOT FBS_CMD_ERROR EQUAL 0) + message(FATAL_ERROR "Flatbuffers flatc execute failed with: '${STATUS}'") + endif() else() target_include_directories(3rdparty_flatbuffers INTERFACE flatbuffers/include) endif()