Allow examples to build outside mastodonpp.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
tastytea 2020-01-18 23:51:34 +01:00
parent 9bc3fe6fe2
commit 161554e677
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
8 changed files with 40 additions and 8 deletions

View File

@ -15,7 +15,11 @@
// Print information about an instance (/api/v1/instance).
#include "mastodonpp.hpp"
#if __has_include("mastodonpp.hpp")
# include "mastodonpp.hpp" // We're building mastodonpp.
#else
# include <mastodonpp/mastodonpp.hpp> // We're building outside mastodonpp.
#endif
#include <iostream>
#include <string>

View File

@ -15,7 +15,11 @@
// Print new public events (/api/v1/streaming/public).
#include "mastodonpp.hpp"
#if __has_include("mastodonpp.hpp")
# include "mastodonpp.hpp" // We're building mastodonpp.
#else
# include <mastodonpp/mastodonpp.hpp> // We're building outside mastodonpp.
#endif
#include <chrono>
#include <iostream>

View File

@ -15,7 +15,11 @@
// Post a status (/api/v1/status).
#include "mastodonpp.hpp"
#if __has_include("mastodonpp.hpp")
# include "mastodonpp.hpp" // We're building mastodonpp.
#else
# include <mastodonpp/mastodonpp.hpp> // We're building outside mastodonpp.
#endif
#include <iostream>
#include <string>

View File

@ -15,7 +15,11 @@
// Post a status (/api/v1/status) with an attachment (/api/v1/media).
#include "mastodonpp.hpp"
#if __has_include("mastodonpp.hpp")
# include "mastodonpp.hpp" // We're building mastodonpp.
#else
# include <mastodonpp/mastodonpp.hpp> // We're building outside mastodonpp.
#endif
#include <iostream>
#include <string>

View File

@ -15,7 +15,11 @@
// Update notification settings (/api/pleroma/notification_settings).
#include "mastodonpp.hpp"
#if __has_include("mastodonpp.hpp")
# include "mastodonpp.hpp" // We're building mastodonpp.
#else
# include <mastodonpp/mastodonpp.hpp> // We're building outside mastodonpp.
#endif
#include <iostream>
#include <string>

View File

@ -15,7 +15,11 @@
// Update account display name settings (/api/v1/accounts/update_credentials).
#include "mastodonpp.hpp"
#if __has_include("mastodonpp.hpp")
# include "mastodonpp.hpp" // We're building mastodonpp.
#else
# include <mastodonpp/mastodonpp.hpp> // We're building outside mastodonpp.
#endif
#include <iostream>
#include <string>

View File

@ -15,7 +15,11 @@
// Post a status (/api/v1/status), then delete it (/api/v1/statuses/:id).
#include "mastodonpp.hpp"
#if __has_include("mastodonpp.hpp")
# include "mastodonpp.hpp" // We're building mastodonpp.
#else
# include <mastodonpp/mastodonpp.hpp> // We're building outside mastodonpp.
#endif
#include <chrono>
#include <iostream>

View File

@ -15,7 +15,11 @@
// Obtain an access token and verify that it works.
#include "mastodonpp.hpp"
#if __has_include("mastodonpp.hpp")
# include "mastodonpp.hpp" // We're building mastodonpp.
#else
# include <mastodonpp/mastodonpp.hpp> // We're building outside mastodonpp.
#endif
#include <cstdlib>
#include <iostream>