aboutsummaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2024-05-10 16:42:45 +0200
committerlonkaars <loek@pipeframe.xyz>2024-05-10 16:42:45 +0200
commit6102d19f5308e09da55aee211c3e7a03f0d7d6f7 (patch)
tree867acf3e29ccb130b42836fa8b88c78a0ee98e90 /client
parent573643a1d3220830de47c810cb1a6be629ce7abd (diff)
protobuf (dropped)trash/protobuf
Diffstat (limited to 'client')
-rw-r--r--client/CMakeLists.txt17
l---------client/lib1
2 files changed, 16 insertions, 2 deletions
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt
index 9e433b1..eae4c66 100644
--- a/client/CMakeLists.txt
+++ b/client/CMakeLists.txt
@@ -4,11 +4,24 @@ set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
-include(../proto/include.cmake)
-
project(puzzlebox_client C CXX)
+find_package(Protobuf REQUIRED)
+
add_executable(main
main.cpp
+ ../proto/puzbusv1.proto
+ )
+
+set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--copy-dt-needed-entries")
+set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--copy-dt-needed-entries")
+set(CMAKE_STATIC_LINKER_FLAGS "-Wl,--copy-dt-needed-entries")
+
+protobuf_generate(
+ APPEND_PATH
+ TARGET main
+ IMPORT_DIRS ../proto/
)
+target_link_libraries(main PRIVATE protobuf::libprotobuf)
+target_include_directories(main PRIVATE "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>")
diff --git a/client/lib b/client/lib
new file mode 120000
index 0000000..dc598c5
--- /dev/null
+++ b/client/lib
@@ -0,0 +1 @@
+../lib \ No newline at end of file