From 2f1d29ecfae70a01ee0d3ebb07a845f4792b547d Mon Sep 17 00:00:00 2001 From: Kevin Matz Date: Mon, 28 Nov 2022 14:18:21 -0500 Subject: [PATCH] move UUID into a submodule --- docs/Doxyfile.in | 2 +- protocol/CMakeLists.txt | 10 +++++++++- protocol/acn/CMakeLists.txt | 1 - protocol/acn/component.h | 3 +-- protocol/acn/pdu-stream.h | 2 +- protocol/ietf/CMakeLists.txt | 4 ++++ IETF.bib => protocol/ietf/IETF.bib | 0 protocol/ietf/uuid/CMakeLists.txt | 16 ++++++++++++++++ protocol/{ => ietf}/uuid/uuid.cpp | 0 protocol/{ => ietf}/uuid/uuid.h | 0 protocol/uuid/CMakeLists.txt | 6 ------ test/CMakeLists.txt | 1 + test/test_uuid.cpp | 4 +--- 13 files changed, 34 insertions(+), 15 deletions(-) create mode 100644 protocol/ietf/CMakeLists.txt rename IETF.bib => protocol/ietf/IETF.bib (100%) create mode 100644 protocol/ietf/uuid/CMakeLists.txt rename protocol/{ => ietf}/uuid/uuid.cpp (100%) rename protocol/{ => ietf}/uuid/uuid.h (100%) delete mode 100644 protocol/uuid/CMakeLists.txt diff --git a/docs/Doxyfile.in b/docs/Doxyfile.in index 4f4d875..bc8a39f 100644 --- a/docs/Doxyfile.in +++ b/docs/Doxyfile.in @@ -104,7 +104,7 @@ FILE_VERSION_FILTER = LAYOUT_FILE = CITE_BIB_FILES = @CMAKE_CURRENT_SOURCE_DIR@/protocol/artistic/ARTISTIC.bib \ @CMAKE_CURRENT_SOURCE_DIR@/ESTA.bib \ - @CMAKE_CURRENT_SOURCE_DIR@/IETF.bib + @CMAKE_CURRENT_SOURCE_DIR@/protocol/ietf/IETF.bib #--------------------------------------------------------------------------- # Configuration options related to warning and progress messages #--------------------------------------------------------------------------- diff --git a/protocol/CMakeLists.txt b/protocol/CMakeLists.txt index a27012f..9e99e69 100644 --- a/protocol/CMakeLists.txt +++ b/protocol/CMakeLists.txt @@ -30,9 +30,17 @@ include(rdmnet/CMakeLists.txt) # E1.56 include(otp/CMakeLists.txt) -# Art-Net 4 +# Internet Engineering Task Force +add_subdirectory(ietf) + +# Artistic License add_subdirectory(artistic) +target_link_libraries(${PROJECT_NAME} + PUBLIC + LCP_ietf_uuid + ) + set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION}) set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION}) diff --git a/protocol/acn/CMakeLists.txt b/protocol/acn/CMakeLists.txt index cc9ece7..4135747 100644 --- a/protocol/acn/CMakeLists.txt +++ b/protocol/acn/CMakeLists.txt @@ -11,4 +11,3 @@ target_sources(${PROJECT_NAME} include(dmp/CMakeLists.txt) include(rlp/CMakeLists.txt) include(sdt/CMakeLists.txt) -include(uuid/CMakeLists.txt) diff --git a/protocol/acn/component.h b/protocol/acn/component.h index f501559..6d3da09 100644 --- a/protocol/acn/component.h +++ b/protocol/acn/component.h @@ -23,8 +23,7 @@ */ #pragma once -#include "uuid/uuid.h" - +#include "uuid.h" #include /** diff --git a/protocol/acn/pdu-stream.h b/protocol/acn/pdu-stream.h index dba66c3..2e636cf 100644 --- a/protocol/acn/pdu-stream.h +++ b/protocol/acn/pdu-stream.h @@ -23,7 +23,7 @@ */ #pragma once -#include "uuid/uuid.h" +#include "uuid.h" #include #include diff --git a/protocol/ietf/CMakeLists.txt b/protocol/ietf/CMakeLists.txt new file mode 100644 index 0000000..0e687e9 --- /dev/null +++ b/protocol/ietf/CMakeLists.txt @@ -0,0 +1,4 @@ +project(${PROJECT_NAME}_ietf VERSION 0.3.1 LANGUAGES CXX) + +# RFC 4122 UUID +add_subdirectory(uuid) diff --git a/IETF.bib b/protocol/ietf/IETF.bib similarity index 100% rename from IETF.bib rename to protocol/ietf/IETF.bib diff --git a/protocol/ietf/uuid/CMakeLists.txt b/protocol/ietf/uuid/CMakeLists.txt new file mode 100644 index 0000000..113a0a8 --- /dev/null +++ b/protocol/ietf/uuid/CMakeLists.txt @@ -0,0 +1,16 @@ +project(${PROJECT_NAME}_uuid VERSION 0.3.1 LANGUAGES CXX) + +add_library(${PROJECT_NAME} SHARED) + +target_sources(${PROJECT_NAME} + PUBLIC + uuid.h + PRIVATE + uuid.cpp +) + +set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${PROJECT_VERSION}) +set_target_properties(${PROJECT_NAME} PROPERTIES SOVERSION ${PROJECT_VERSION}) + +target_compile_definitions(${PROJECT_NAME} PUBLIC ${PROJECT_NAME}_LIBRARY) +target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/protocol/uuid/uuid.cpp b/protocol/ietf/uuid/uuid.cpp similarity index 100% rename from protocol/uuid/uuid.cpp rename to protocol/ietf/uuid/uuid.cpp diff --git a/protocol/uuid/uuid.h b/protocol/ietf/uuid/uuid.h similarity index 100% rename from protocol/uuid/uuid.h rename to protocol/ietf/uuid/uuid.h diff --git a/protocol/uuid/CMakeLists.txt b/protocol/uuid/CMakeLists.txt deleted file mode 100644 index f33e817..0000000 --- a/protocol/uuid/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -target_sources(${PROJECT_NAME} - PUBLIC - uuid/uuid.h - PRIVATE - uuid/uuid.cpp - ) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 18d8e48..40aed37 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -14,6 +14,7 @@ if (GTest_FOUND) PRIVATE GTest::gtest LCP + LCP_ietf_uuid ) target_include_directories(${PROJECT_NAME} PUBLIC diff --git a/test/test_uuid.cpp b/test/test_uuid.cpp index 1bba50c..595f082 100644 --- a/test/test_uuid.cpp +++ b/test/test_uuid.cpp @@ -23,10 +23,8 @@ */ #include - -#include "uuid/uuid.h" - #include +#include "uuid.h" TEST(UUID, ver4fromString) {