From b49cead47537d8d1d2c78cb4596bb828fd94b347 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Sun, 30 Nov 2014 13:51:21 +0100 Subject: create a common lib, autogen the buffer classes there dynamically simplifies the generate_buffers function a bit. only missing part now: get the binaries to rebuild when the buffer class is updated. apparently this doesn't cause the common library to rebuild and so the client and resource binaries don't know they need to rebuild automatically. but at least the _generated.h files are now dynamically created. huzzah for that. --- common/CMakeLists.txt | 10 +++++++++- common/commands/CMakeLists.txt | 1 - 2 files changed, 9 insertions(+), 2 deletions(-) delete mode 100644 common/commands/CMakeLists.txt (limited to 'common') diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 2ceacf8..32e10f6 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -1 +1,9 @@ -add_subdirectory(commands) +project(toynadicommon) +generate_flatbuffers(commands/handshake) + +set(command_SRCS + console.cpp + ${CMAKE_CURRENT_BINARY_DIR}/commands/handshake_generated.h) + +add_library(${PROJECT_NAME} ${command_SRCS}) +qt5_use_modules(${PROJECT_NAME} Widgets) diff --git a/common/commands/CMakeLists.txt b/common/commands/CMakeLists.txt deleted file mode 100644 index 2a9ba64..0000000 --- a/common/commands/CMakeLists.txt +++ /dev/null @@ -1 +0,0 @@ -generate_flatbuffers(${CMAKE_CURRENT_BINARY_DIR} handshake.fbs) -- cgit v1.2.3