Updated header location in examples, easy.hpp
This commit is contained in:
parent
dae9ac1fc2
commit
f7eafdaf95
|
@ -1,4 +1,5 @@
|
|||
/build/
|
||||
/doc/
|
||||
/update_gh-pages.sh
|
||||
/src/mastodon-cpp
|
||||
/src/examples/example99*
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
cmake_minimum_required (VERSION 3.7)
|
||||
project (mastodon-cpp
|
||||
VERSION 0.7.0
|
||||
VERSION 0.7.1
|
||||
LANGUAGES CXX
|
||||
)
|
||||
|
||||
|
@ -26,6 +26,10 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|||
add_definitions(-DDEBUG=1)
|
||||
endif()
|
||||
|
||||
if(WITHOUT_EASY)
|
||||
add_definitions(-DWITHOUT_EASY=1)
|
||||
endif()
|
||||
|
||||
# Library
|
||||
if(WITHOUT_EASY)
|
||||
file(GLOB sources src/*.cpp src/api/*.cpp)
|
||||
|
@ -39,16 +43,16 @@ set_target_properties(mastodon-cpp PROPERTIES
|
|||
)
|
||||
if(WITHOUT_EASY)
|
||||
target_link_libraries(mastodon-cpp curlpp)
|
||||
install(FILES src/mastodon-cpp.hpp
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mastodon-cpp)
|
||||
else()
|
||||
target_link_libraries(mastodon-cpp curlpp jsoncpp)
|
||||
install(FILES src/mastodon-cpp.hpp src/easy/easy.hpp
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mastodon-cpp)
|
||||
endif()
|
||||
install(TARGETS mastodon-cpp LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
install(FILES ${PROJECT_SOURCE_DIR}/src/mastodon-cpp.hpp
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
install(FILES src/mastodon-cpp.hpp
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mastodon-cpp)
|
||||
if(NOT WITHOUT_EASY)
|
||||
install(FILES src/easy/easy.hpp
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/mastodon-cpp)
|
||||
endif()
|
||||
|
||||
# Documentation
|
||||
if(WITH_DOC)
|
||||
|
|
|
@ -9,12 +9,16 @@ The HTML reference can be generated with `build_doc.sh`, if doxygen is installed
|
|||
Or just look in `src/mastodon-cpp.hpp`. It is also available at [tastytea.github.io/mastodon-cpp/](https://tastytea.github.io/mastodon-cpp/docs/classMastodon_1_1API.html).
|
||||
There are [examples](https://github.com/tastytea/mastodon-cpp/tree/master/src/examples) in `src/examples/`.
|
||||
|
||||
## Upgrading from below 0.7.0
|
||||
|
||||
The header location has changed. It is now in `mastodon-cpp/`.
|
||||
|
||||
## Most basic example
|
||||
|
||||
```C++
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <mastodon-cpp.hpp>
|
||||
#include <mastodon-cpp/mastodon-cpp.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
|
@ -85,8 +89,8 @@ To use the DEB package on stretch, you will need [libcurlpp0](https://packages.d
|
|||
* [libcurl](https://curl.haxx.se/) (tested: 7.58.0/7.35.0)
|
||||
* [curlpp](http://www.curlpp.org/) (tested: 0.8.1/0.7.3)
|
||||
* Optional
|
||||
* Easy interface & Examples: [jsoncpp](https://github.com/open-source-parsers/jsoncpp) (tested: 1.8.1 / 1.7.2)
|
||||
* Documentation: [doxygen](https://www.stack.nl/~dimitri/doxygen/) (tested: 1.8.13)
|
||||
* Examples: [jsoncpp](https://github.com/open-source-parsers/jsoncpp) (tested: 1.8.1 / 1.7.2)
|
||||
* DEB package: [dpkg](https://packages.qa.debian.org/dpkg) (tested: 1.19.0.5)
|
||||
* RPM package: [rpm](http://www.rpm.org) (tested: 4.11.0.1)
|
||||
|
||||
|
@ -112,6 +116,7 @@ Download the current release at [GitHub](https://github.com/tastytea/mastodon-cp
|
|||
cmake options:
|
||||
|
||||
* `-DCMAKE_BUILD_TYPE=Debug` for a debug build
|
||||
* `-DWITHOUT_EASY=ON` to not build the Easy abstractions and to get rid of the jsoncpp-dependency (not recommended)
|
||||
* `-DWITH_EXAMPLES=ON` if you want to compile the examples
|
||||
* `-DWITH_TESTS=ON` if you want to compile the tests
|
||||
* `-DWITH_DOC=ON` if you want to compile the HTML reference
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include <cstdint>
|
||||
#include <chrono>
|
||||
#include <jsoncpp/json/json.h>
|
||||
#include "mastodon-cpp.hpp"
|
||||
#include "mastodon-cpp/mastodon-cpp.hpp"
|
||||
|
||||
using std::string;
|
||||
using std::uint16_t;
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <vector>
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
#include "../mastodon-cpp.hpp"
|
||||
#include "mastodon-cpp/mastodon-cpp.hpp"
|
||||
|
||||
using Mastodon::API;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <cstdint>
|
||||
#include <sstream>
|
||||
#include <jsoncpp/json/json.h>
|
||||
#include "../mastodon-cpp.hpp"
|
||||
#include "mastodon-cpp/mastodon-cpp.hpp"
|
||||
|
||||
using Mastodon::API;
|
||||
using std::cout;
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <jsoncpp/json/json.h>
|
||||
#include "../mastodon-cpp.hpp"
|
||||
#include "mastodon-cpp/mastodon-cpp.hpp"
|
||||
|
||||
using Mastodon::API;
|
||||
using std::cout;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <vector>
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
#include "../mastodon-cpp.hpp"
|
||||
#include "mastodon-cpp/mastodon-cpp.hpp"
|
||||
|
||||
using Mastodon::API;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <cstdint>
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
#include "../mastodon-cpp.hpp"
|
||||
#include "mastodon-cpp/mastodon-cpp.hpp"
|
||||
|
||||
using Mastodon::API;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <cstdint>
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
#include "../mastodon-cpp.hpp"
|
||||
#include "mastodon-cpp/mastodon-cpp.hpp"
|
||||
|
||||
using Mastodon::API;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <string>
|
||||
#include <cstdint>
|
||||
#include <sstream>
|
||||
#include "../mastodon-cpp.hpp"
|
||||
#include "mastodon-cpp/mastodon-cpp.hpp"
|
||||
|
||||
using Mastodon::API;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include <vector>
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
#include "../mastodon-cpp.hpp"
|
||||
#include "mastodon-cpp/mastodon-cpp.hpp"
|
||||
|
||||
using Mastodon::API;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#include <thread>
|
||||
#include <chrono>
|
||||
#include <memory>
|
||||
#include "../mastodon-cpp.hpp"
|
||||
#include "mastodon-cpp/mastodon-cpp.hpp"
|
||||
|
||||
using Mastodon::API;
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include <iostream>
|
||||
#include <string>
|
||||
#include <cstdint>
|
||||
#include "../mastodon-cpp.hpp"
|
||||
#include "mastodon-cpp/mastodon-cpp.hpp"
|
||||
|
||||
using Mastodon::API;
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#include <cstdint>
|
||||
#include <sstream>
|
||||
#include <jsoncpp/json/json.h>
|
||||
#include "../mastodon-cpp.hpp"
|
||||
#include "mastodon-cpp/mastodon-cpp.hpp"
|
||||
|
||||
using Mastodon::API;
|
||||
|
||||
|
|
Reference in New Issue