Moved entites into src/easy/entities/

This commit is contained in:
tastytea 2018-04-03 00:13:21 +02:00
parent fe7c20fe9e
commit 87fded18db
Signed by: tastytea
GPG Key ID: 59346E0EA35C67E5
33 changed files with 63 additions and 58 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.7) cmake_minimum_required (VERSION 3.7)
project (mastodon-cpp project (mastodon-cpp
VERSION 0.8.1 VERSION 0.8.2
LANGUAGES CXX LANGUAGES CXX
) )
@ -22,7 +22,8 @@ configure_file (
"${PROJECT_BINARY_DIR}/version.hpp" "${PROJECT_BINARY_DIR}/version.hpp"
) )
# Announce that we are compiling mastodon-cpp (used in easy.hpp and examples) # Announce that we are compiling mastodon-cpp (used to figure out where the
# headers are)
add_definitions(-DMASTODON_CPP=1) add_definitions(-DMASTODON_CPP=1)
if(CMAKE_BUILD_TYPE STREQUAL "Debug") if(CMAKE_BUILD_TYPE STREQUAL "Debug")
@ -37,7 +38,8 @@ endif()
if(WITHOUT_EASY) if(WITHOUT_EASY)
file(GLOB sources src/*.cpp src/api/*.cpp) file(GLOB sources src/*.cpp src/api/*.cpp)
else() else()
file(GLOB sources src/*.cpp src/api/*.cpp src/easy/*.cpp) file(GLOB sources src/*.cpp src/api/*.cpp
src/easy/*.cpp src/easy/entities/*.cpp)
endif() endif()
add_library(mastodon-cpp SHARED ${sources}) add_library(mastodon-cpp SHARED ${sources})
set_target_properties(mastodon-cpp PROPERTIES set_target_properties(mastodon-cpp PROPERTIES
@ -56,6 +58,9 @@ if(NOT WITHOUT_EASY)
file(GLOB easy_header src/easy/*.hpp) file(GLOB easy_header src/easy/*.hpp)
install(FILES ${easy_header} install(FILES ${easy_header}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mastodon-cpp/easy) DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mastodon-cpp/easy)
file(GLOB easy_entities_header src/easy/entities/*.hpp)
install(FILES ${easy_entities_header}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mastodon-cpp/easy/entities)
endif() endif()
# Documentation # Documentation

View File

@ -20,38 +20,38 @@
// If we are compiling mastodon-cpp, use another include path // If we are compiling mastodon-cpp, use another include path
#ifdef MASTODON_CPP #ifdef MASTODON_CPP
#include "easy/easy.hpp" #include "easy/easy.hpp"
#include "easy/account.hpp" #include "easy/entities/account.hpp"
#include "easy/application.hpp" #include "easy/entities/application.hpp"
#include "easy/attachment.hpp" #include "easy/entities/attachment.hpp"
#include "easy/card.hpp" #include "easy/entities/card.hpp"
#include "easy/context.hpp" #include "easy/entities/context.hpp"
#include "easy/emoji.hpp" #include "easy/entities/emoji.hpp"
#include "easy/instance.hpp" #include "easy/entities/instance.hpp"
#include "easy/list.hpp" #include "easy/entities/list.hpp"
#include "easy/mention.hpp" #include "easy/entities/mention.hpp"
#include "easy/notification.hpp" #include "easy/entities/notification.hpp"
#include "easy/relationship.hpp" #include "easy/entities/relationship.hpp"
#include "easy/report.hpp" #include "easy/entities/report.hpp"
#include "easy/results.hpp" #include "easy/entities/results.hpp"
#include "easy/status.hpp" #include "easy/entities/status.hpp"
#include "easy/tag.hpp" #include "easy/entities/tag.hpp"
#else #else
#include <mastodon-cpp/easy/easy.hpp> #include <mastodon-cpp/easy/easy.hpp>
#include <mastodon-cpp/easy/account.hpp> #include <mastodon-cpp/entities/easy/account.hpp>
#include <mastodon-cpp/easy/application.hpp> #include <mastodon-cpp/entities/easy/application.hpp>
#include <mastodon-cpp/easy/attachment.hpp> #include <mastodon-cpp/entities/easy/attachment.hpp>
#include <mastodon-cpp/easy/card.hpp> #include <mastodon-cpp/entities/easy/card.hpp>
#include <mastodon-cpp/easy/context.hpp> #include <mastodon-cpp/entities/easy/context.hpp>
#include <mastodon-cpp/easy/emoji.hpp> #include <mastodon-cpp/entities/easy/emoji.hpp>
#include <mastodon-cpp/easy/instance.hpp> #include <mastodon-cpp/entities/easy/instance.hpp>
#include <mastodon-cpp/easy/list.hpp> #include <mastodon-cpp/entities/easy/list.hpp>
#include <mastodon-cpp/easy/mention.hpp> #include <mastodon-cpp/entities/easy/mention.hpp>
#include <mastodon-cpp/easy/notification.hpp> #include <mastodon-cpp/entities/easy/notification.hpp>
#include <mastodon-cpp/easy/relationship.hpp> #include <mastodon-cpp/entities/easy/relationship.hpp>
#include <mastodon-cpp/easy/report.hpp> #include <mastodon-cpp/entities/easy/report.hpp>
#include <mastodon-cpp/easy/results.hpp> #include <mastodon-cpp/entities/easy/results.hpp>
#include <mastodon-cpp/easy/status.hpp> #include <mastodon-cpp/entities/easy/status.hpp>
#include <mastodon-cpp/easy/tag.hpp> #include <mastodon-cpp/entities/easy/tag.hpp>
#endif #endif
#endif // MASTODON_CPP_EASY_ALL_HPP #endif // MASTODON_CPP_EASY_ALL_HPP

View File

@ -24,11 +24,11 @@
#ifdef MASTODON_CPP #ifdef MASTODON_CPP
#include "mastodon-cpp.hpp" #include "mastodon-cpp.hpp"
#include "easy/easy.hpp" #include "easy/easy.hpp"
#include "easy/status.hpp" #include "easy/entities/status.hpp"
#else #else
#include <mastodon-cpp/mastodon-cpp.hpp> #include <mastodon-cpp/mastodon-cpp.hpp>
#include <mastodon-cpp/easy/easy.hpp> #include <mastodon-cpp/easy/easy.hpp>
#include <mastodon-cpp/easy/status.hpp> #include <mastodon-cpp/easy/entities/status.hpp>
#endif #endif
using std::string; using std::string;

View File

@ -24,11 +24,11 @@
#ifdef MASTODON_CPP #ifdef MASTODON_CPP
#include "mastodon-cpp.hpp" #include "mastodon-cpp.hpp"
#include "easy/easy.hpp" #include "easy/easy.hpp"
#include "easy/account.hpp" #include "easy/entities/account.hpp"
#else #else
#include <mastodon-cpp/mastodon-cpp.hpp> #include <mastodon-cpp/mastodon-cpp.hpp>
#include <mastodon-cpp/easy/easy.hpp> #include <mastodon-cpp/easy/easy.hpp>
#include <mastodon-cpp/easy/account.hpp> #include <mastodon-cpp/easy/entities/account.hpp>
#endif #endif
using std::string; using std::string;

View File

@ -25,13 +25,13 @@
#ifdef MASTODON_CPP #ifdef MASTODON_CPP
#include "mastodon-cpp.hpp" #include "mastodon-cpp.hpp"
#include "easy/easy.hpp" #include "easy/easy.hpp"
#include "easy/account.hpp" #include "easy/entities/account.hpp"
#include "easy/status.hpp" #include "easy/entities/status.hpp"
#else #else
#include <mastodon-cpp/mastodon-cpp.hpp> #include <mastodon-cpp/mastodon-cpp.hpp>
#include <mastodon-cpp/easy/easy.hpp> #include <mastodon-cpp/easy/easy.hpp>
#include <mastodon-cpp/easy/account.hpp> #include <mastodon-cpp/entities/easy/account.hpp>
#include <mastodon-cpp/easy/status.hpp> #include <mastodon-cpp/entities/easy/status.hpp>
#endif #endif
using std::string; using std::string;

View File

@ -24,13 +24,13 @@
#ifdef MASTODON_CPP #ifdef MASTODON_CPP
#include "mastodon-cpp.hpp" #include "mastodon-cpp.hpp"
#include "easy/easy.hpp" #include "easy/easy.hpp"
#include "easy/account.hpp" #include "easy/entities/account.hpp"
#include "easy/status.hpp" #include "easy/entities/status.hpp"
#else #else
#include <mastodon-cpp/mastodon-cpp.hpp> #include <mastodon-cpp/mastodon-cpp.hpp>
#include <mastodon-cpp/easy/easy.hpp> #include <mastodon-cpp/easy/easy.hpp>
#include <mastodon-cpp/easy/account.hpp> #include <mastodon-cpp/easy/entities/account.hpp>
#include <mastodon-cpp/easy/status.hpp> #include <mastodon-cpp/easy/entities/status.hpp>
#endif #endif
using std::string; using std::string;

View File

@ -26,21 +26,21 @@
#ifdef MASTODON_CPP #ifdef MASTODON_CPP
#include "mastodon-cpp.hpp" #include "mastodon-cpp.hpp"
#include "easy/easy.hpp" #include "easy/easy.hpp"
#include "easy/account.hpp" #include "easy/entities/account.hpp"
#include "easy/emoji.hpp" #include "easy/entities/emoji.hpp"
#include "easy/attachment.hpp" #include "easy/entities/attachment.hpp"
#include "easy/mention.hpp" #include "easy/entities/mention.hpp"
#include "easy/tag.hpp" #include "easy/entities/tag.hpp"
#include "easy/application.hpp" #include "easy/entities/application.hpp"
#else #else
#include <mastodon-cpp/mastodon-cpp.hpp> #include <mastodon-cpp/mastodon-cpp.hpp>
#include <mastodon-cpp/easy/easy.hpp> #include <mastodon-cpp/easy/easy.hpp>
#include <mastodon-cpp/easy/account.hpp> #include <mastodon-cpp/easy/entities/account.hpp>
#include <mastodon-cpp/easy/emoji.hpp> #include <mastodon-cpp/easy/entities/emoji.hpp>
#include <mastodon-cpp/easy/attachment.hpp> #include <mastodon-cpp/easy/entities/attachment.hpp>
#include <mastodon-cpp/easy/mention.hpp> #include <mastodon-cpp/easy/entities/mention.hpp>
#include <mastodon-cpp/easy/tag.hpp> #include <mastodon-cpp/easy/entities/tag.hpp>
#include <mastodon-cpp/easy/application.hpp> #include <mastodon-cpp/easy/entities/application.hpp>
#endif #endif
using std::string; using std::string;

View File

@ -5,7 +5,7 @@
#include <cstdint> #include <cstdint>
#include "mastodon-cpp.hpp" #include "mastodon-cpp.hpp"
#include "easy/easy.hpp" #include "easy/easy.hpp"
#include "easy/status.hpp" #include "easy/entities/status.hpp"
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {