diff --git a/.gitignore b/.gitignore index d835f77..dc949bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ build -.cache \ No newline at end of file +.cache + +/include/WHISPER/Messages/Protos/*.pb.cc +/include/WHISPER/Messages/Protos/*.pb.h \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index e0bc20e..af75ad0 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,6 +29,7 @@ set(protobuf_BUILD_EXAMPLES OFF CACHE INTERNAL "") add_subdirectory(libs/protobuf EXCLUDE_FROM_ALL) include(protobuf) +protobuf_generate_cpp(PROTO_PATH include/WHISPER/Messages/Protos/ CPP_PATH include/WHISPER/Messages/Protos HPP_PATH include/WHISPER/Messages/Protos) if(protobuf_VERBOSE) message(STATUS "Using Protocol Buffers ${protobuf_VERSION}") @@ -59,17 +60,16 @@ target_include_directories(whisper-com PUBLIC add_executable(main src/main.cpp + ../include/WHISPER/Messages/Protos/join.pb.cc + ) - add_dependencies(main protoc) target_link_libraries(main whisper-com loguru - libprotobuf ) - protobuf_generate_cpp(PROTO_PATH protos CPP_PATH include/WHISPER/Messages/Protos HPP_PATH include/WHISPER/Messages/Protos) # @@ -83,6 +83,5 @@ IF (${TEST_WHISPER_COMMUNICATION_LIBRARY}) target_link_libraries(test_test Catch2::Catch2 whisper-com loguru) catch_discover_tests(test_test) - add_dependencies(test_test protoc) ENDIF() diff --git a/src/main.cpp b/src/main.cpp index c9232b5..f7fb09d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,12 +1,12 @@ #include -#include "protos/join.pb.h" - +#include "../include/WHISPER/Messages/Protos/join.pb.h" int main() { + GOOGLE_PROTOBUF_VERIFY_VERSION; - +return 0; } \ No newline at end of file