From 8a8c95a94addd40e2d5b5a79dafd92435c3f6ffc Mon Sep 17 00:00:00 2001 From: boba Date: Tue, 25 Oct 2022 06:18:32 +0500 Subject: [PATCH] Removed submodule --- .github/workflows/macos.yml | 2 +- .github/workflows/ubuntu.yml | 2 +- .github/workflows/windows.yml | 2 +- .gitmodules | 3 --- CMakeLists.txt | 4 +--- examples/1/main.cpp | 2 +- include/Types.hpp | 2 +- submodules/install.cmake | 26 -------------------------- submodules/json | 1 - 9 files changed, 6 insertions(+), 38 deletions(-) delete mode 100644 .gitmodules delete mode 100644 submodules/install.cmake delete mode 160000 submodules/json diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml index edfdbfe..caf7583 100644 --- a/.github/workflows/macos.yml +++ b/.github/workflows/macos.yml @@ -18,7 +18,7 @@ jobs: runs-on: macos-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v1 with: submodules: true diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 47f6a89..c7f1d72 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -18,7 +18,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v1 with: submodules: true diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 69620e2..4b8cc0d 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -18,7 +18,7 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v1 with: submodules: true diff --git a/.gitmodules b/.gitmodules deleted file mode 100644 index 6d12152..0000000 --- a/.gitmodules +++ /dev/null @@ -1,3 +0,0 @@ -[submodule "submodules/json"] - path = submodules/json - url = https://github.com/nlohmann/json diff --git a/CMakeLists.txt b/CMakeLists.txt index 0db77ac..c3a4c22 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,8 +27,6 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/include/Config.hpp.in ${CMAKE_CURRENT file(GLOB TARGET_SRC "./src/*.cpp") file(GLOB TARGET_HEADERS "./include/*.hpp") -include(submodules/install.cmake) - if(BUILD_LIBRARY) add_library(${PROJECT_NAME} STATIC ${TARGET_SRC} ${TARGET_HEADERS}) else() @@ -36,7 +34,7 @@ else() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") endif() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lcurl") - add_executable(${PROJECT_NAME} ${TARGET_SRC} ${TARGET_HEADERS}) + add_executable(${PROJECT_NAME}_EXE ${TARGET_SRC} ${TARGET_HEADERS}) endif() # Include headers diff --git a/examples/1/main.cpp b/examples/1/main.cpp index 853337f..95f1f33 100644 --- a/examples/1/main.cpp +++ b/examples/1/main.cpp @@ -10,7 +10,7 @@ int main(int argc, const char** argv) std::cout << "I'm created vk::BotBase!" << std::endl; std::cout << "The address is: " << &bot << std::endl; try { - if (bot.Auth(access_token) == true) { + if (bot.Auth(access_token)) { std::cout << "Auth is ended successfully" << std::endl; } else { std::cout << "Auth is failed!" << std::endl; diff --git a/include/Types.hpp b/include/Types.hpp index 7020e0b..101f634 100644 --- a/include/Types.hpp +++ b/include/Types.hpp @@ -21,7 +21,7 @@ typedef unsigned int uint32_t; typedef unsigned long long uint64_t; #endif // __CPLUSPLUS_OVER_11 -#include "nlohmann/json.hpp" // nlohmann::json +#include "nlohmann/json.hpp" namespace vk { diff --git a/submodules/install.cmake b/submodules/install.cmake deleted file mode 100644 index 433b376..0000000 --- a/submodules/install.cmake +++ /dev/null @@ -1,26 +0,0 @@ -if((NOT NLOHMANN_JSON_INCLUDE_DIR) OR (NOT EXISTS ${NLOHMANN_JSON_INCLUDE_DIR})) - message("Unable to find nlohmann/json, cloning...") - - execute_process(COMMAND git submodule update --init -- submodules/json - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) - - set(NLOHMANN_JSON_SOURCE_DIR - ${CMAKE_CURRENT_SOURCE_DIR}/submodules/json/ - CACHE PATH "nlohmann/json include directory") - - install(FILES ${NLOHMANN_JSON_SOURCE_DIR}/single_include/nlohmann/json.hpp DESTINATION ${CMAKE_INSTALL_BINDIR}/include/vkapi/nlohmann) - - # Setup a target - add_library(nlohmann_json INTERFACE) - target_include_directories(nlohmann_json INTERFACE - $ - $) - - install(TARGETS nlohmann_json EXPORT nlohmann_json DESTINATION ${CMAKE_INSTALL_BINDIR}/include/vkapi/nlohmann) - install( - EXPORT nlohmann_json - FILE nlohmann_jsonTargets.cmake - # NAMESPACE nlohmann_json:: - DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ - ) -endif() \ No newline at end of file diff --git a/submodules/json b/submodules/json deleted file mode 160000 index 1fd2213..0000000 --- a/submodules/json +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 1fd2213fd206d12a818cd5c60dd0138445534133