From f588d409c9abd4459f9315195072e6185fc642f1 Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Thu, 9 Jan 2020 16:57:01 +0900 Subject: [PATCH] Truncate "UDPConnection" to "UDPC" --- CMakeLists.txt | 40 ++++++++++++++++----------------- src/{UDPConnection.h => UDPC.h} | 0 src/UDPC_Defines.hpp | 2 +- src/UDPConnection.cpp | 2 +- src/test/TestUDPC.cpp | 2 +- src/test/UDPC_NetworkTest.c | 2 +- 6 files changed, 24 insertions(+), 24 deletions(-) rename src/{UDPConnection.h => UDPC.h} (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 015e265..a2597af 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,9 +1,9 @@ cmake_minimum_required(VERSION 3.7) -project(UDPConnection) +project(UDPC) -set(UDPConnection_VERSION 1.0) +set(UDPC_VERSION 1.0) -set(UDPConnection_SOURCES +set(UDPC_SOURCES src/UDPConnection.cpp ) @@ -17,20 +17,20 @@ if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release") endif() -add_library(UDPConnection ${UDPConnection_SOURCES}) +add_library(UDPC ${UDPC_SOURCES}) -set_target_properties(UDPConnection PROPERTIES VERSION ${UDPConnection_VERSION}) +set_target_properties(UDPC PROPERTIES VERSION ${UDPC_VERSION}) -target_compile_features(UDPConnection PUBLIC cxx_std_11) -target_link_libraries(UDPConnection PUBLIC pthread) +target_compile_features(UDPC PUBLIC cxx_std_11) +target_link_libraries(UDPC PUBLIC pthread) if(WIN32) if(MINGW) - target_compile_definitions(UDPConnection PUBLIC UDPC_PLATFORM_MINGW) - target_link_libraries(UDPConnection PUBLIC ws2_32) - target_link_libraries(UDPConnection PUBLIC iphlpapi) + target_compile_definitions(UDPC PUBLIC UDPC_PLATFORM_MINGW) + target_link_libraries(UDPC PUBLIC ws2_32) + target_link_libraries(UDPC PUBLIC iphlpapi) else() - target_link_libraries(UDPConnection PUBLIC Ws2_32) - target_link_libraries(UDPConnection PUBLIC Iphlpapi) + target_link_libraries(UDPC PUBLIC Ws2_32) + target_link_libraries(UDPC PUBLIC Iphlpapi) endif() endif() @@ -40,10 +40,10 @@ else() find_package(PkgConfig REQUIRED) pkg_check_modules(LIBSODIUM QUIET libsodium) if(LIBSODIUM_FOUND) - target_compile_definitions(UDPConnection PUBLIC UDPC_LIBSODIUM_ENABLED) - target_link_libraries(UDPConnection PUBLIC ${LIBSODIUM_LIBRARIES}) - target_include_directories(UDPConnection PUBLIC ${LIBSODIUM_INCLUDE_DIRS}) - target_compile_options(UDPConnection PUBLIC ${LIBSODIUM_CFLAGS_OTHER}) + target_compile_definitions(UDPC PUBLIC UDPC_LIBSODIUM_ENABLED) + target_link_libraries(UDPC PUBLIC ${LIBSODIUM_LIBRARIES}) + target_include_directories(UDPC PUBLIC ${LIBSODIUM_INCLUDE_DIRS}) + target_compile_options(UDPC PUBLIC ${LIBSODIUM_CFLAGS_OTHER}) message(STATUS "libsodium enabled") else() message(STATUS "libsodium not found, UDPC will be compiled without libsodium support") @@ -61,18 +61,18 @@ if(CMAKE_BUILD_TYPE MATCHES "Debug") ) add_executable(UnitTest ${UDPC_UnitTest_SOURCES}) target_compile_features(UnitTest PUBLIC cxx_std_11) - target_link_libraries(UnitTest PUBLIC UDPConnection ${GTEST_BOTH_LIBRARIES}) + target_link_libraries(UnitTest PUBLIC UDPC ${GTEST_BOTH_LIBRARIES}) target_include_directories(UnitTest PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src) endif() set(UDPC_NetworkTest_SOURCES src/test/UDPC_NetworkTest.c) add_executable(NetworkTest ${UDPC_NetworkTest_SOURCES}) - target_link_libraries(NetworkTest PUBLIC UDPConnection) + target_link_libraries(NetworkTest PUBLIC UDPC) target_include_directories(NetworkTest PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src) endif() -install(TARGETS UDPConnection DESTINATION lib) +install(TARGETS UDPC DESTINATION lib) install(FILES - ${CMAKE_CURRENT_SOURCE_DIR}/src/UDPConnection.h + ${CMAKE_CURRENT_SOURCE_DIR}/src/UDPC.h DESTINATION include) diff --git a/src/UDPConnection.h b/src/UDPC.h similarity index 100% rename from src/UDPConnection.h rename to src/UDPC.h diff --git a/src/UDPC_Defines.hpp b/src/UDPC_Defines.hpp index 2114cbc..368434e 100644 --- a/src/UDPC_Defines.hpp +++ b/src/UDPC_Defines.hpp @@ -33,7 +33,7 @@ #include #include "TSLQueue.hpp" -#include "UDPConnection.h" +#include "UDPC.h" #include diff --git a/src/UDPConnection.cpp b/src/UDPConnection.cpp index fd021b3..f0bb981 100644 --- a/src/UDPConnection.cpp +++ b/src/UDPConnection.cpp @@ -1,5 +1,5 @@ #include "UDPC_Defines.hpp" -#include "UDPConnection.h" +#include "UDPC.h" #include #include diff --git a/src/test/TestUDPC.cpp b/src/test/TestUDPC.cpp index f42c10b..5e4c98c 100644 --- a/src/test/TestUDPC.cpp +++ b/src/test/TestUDPC.cpp @@ -1,6 +1,6 @@ #include -#include +#include #include #include diff --git a/src/test/UDPC_NetworkTest.c b/src/test/UDPC_NetworkTest.c index 3f072cc..56a65f5 100644 --- a/src/test/UDPC_NetworkTest.c +++ b/src/test/UDPC_NetworkTest.c @@ -8,7 +8,7 @@ #include #endif -#include +#include #define QUEUED_MAX_SIZE 32 #define SEND_IDS_SIZE 64