Merge pull request #5 from jcwenger/feature/install

Support installation into /usr/local/include
develop
Jason Wenger 2020-05-25 22:32:34 -10:00 committed by GitHub
commit 5cdac83352
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 19 additions and 0 deletions

View File

@ -77,6 +77,9 @@ target_link_libraries(aasdk
${OPENSSL_LIBRARIES}
${WINSOCK2_LIBRARIES})
install(TARGETS aasdk DESTINATION lib)
install(DIRECTORY include/f1x DESTINATION include)
if(AASDK_TEST)
add_executable(aasdk_ut
${tests_source_files}

View File

@ -7,3 +7,7 @@ protobuf_generate_cpp(proto_sources proto_headers ${proto_files})
add_library(aasdk_proto SHARED ${proto_headers} ${proto_sources})
target_link_libraries(aasdk_proto ${PROTOBUF_LIBRARIES})
install(TARGETS aasdk_proto DESTINATION lib)
install(DIRECTORY . DESTINATION include/aasdk_proto
FILES_MATCHING PATTERN *.h
PATTERN CMakeFiles EXCLUDE )

View File

@ -20,6 +20,7 @@
#include <functional>
#include <boost/asio.hpp>
#include <boost/core/noncopyable.hpp>
#include <f1x/aasdk/Error/Error.hpp>
#include <f1x/aasdk/IO/IOContextWrapper.hpp>

View File

@ -38,7 +38,12 @@ ServiceChannel::ServiceChannel(boost::asio::io_service::strand& strand,
void ServiceChannel::send(messenger::Message::Pointer message, SendPromise::Pointer promise)
{
#if BOOST_VERSION < 106600
auto sendPromise = messenger::SendPromise::defer(strand_.get_io_service());
#else
auto sendPromise = messenger::SendPromise::defer(strand_.context());
#endif
io::PromiseLink<>::forward(*sendPromise, std::move(promise));
messenger_->enqueueSend(std::move(message), std::move(sendPromise));
}

View File

@ -57,9 +57,15 @@ void AccessoryModeQueryChain::start(DeviceHandle handle, Promise::Pointer promis
promise_.reset();
});
#if BOOST_VERSION < 106600
this->startQuery(AccessoryModeQueryType::PROTOCOL_VERSION,
std::make_shared<USBEndpoint>(usbWrapper_, strand_.get_io_service(), std::move(handle)),
std::move(queryPromise));
#else
this->startQuery(AccessoryModeQueryType::PROTOCOL_VERSION,
std::make_shared<USBEndpoint>(usbWrapper_, strand_.context(), std::move(handle)),
std::move(queryPromise));
#endif
}
});
}