Skip to content

Commit

Permalink
Initial import
Browse files Browse the repository at this point in the history
  • Loading branch information
tm604 committed Jun 3, 2015
0 parents commit 8063e6f
Show file tree
Hide file tree
Showing 8 changed files with 4,205 additions and 0 deletions.
43 changes: 43 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
cmake_minimum_required(VERSION 2.8)
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})

PROJECT(asio-amqp)

enable_testing()
set (VERSION_MAJOR 1)
set (VERSION_MINOR 0)

set(Boost_USE_MULTITHREADED ON)
add_definitions(-DBOOST_LOG_DYN_LINK)

include(cotire)
include_directories(include/ src/)

find_package(Boost COMPONENTS system regex thread log unit_test_framework)
find_package(Threads REQUIRED)

find_package(AMQP REQUIRED)
include_directories(${AMQP_INCLUDE_DIR})

add_executable(
amqp_tests
src/amqp_tests.cpp
)

target_link_libraries(
amqp_tests
${AMQP_LIBRARY}
${Boost_LIBRARIES}
)
set_target_properties(amqp_tests PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "src/stdafx.h")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
# target_compile_features(amqp_tests PRIVATE cxx_constexpr)
cotire(amqp_tests)

install(
DIRECTORY include/
DESTINATION "include"
)
include (CTest)
add_test (boost amqp_tests --log_level=all --log_format=XML --log_sink=amqp_tests.xml)

20 changes: 20 additions & 0 deletions FindAMQP.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Find the Rabbitmq C library

SET(_AMQP_REQUIRED_VARS AMQP_INCLUDE_DIR AMQP_LIBRARY )

# Find the include directories
FIND_PATH(AMQP_INCLUDE_DIR
NAMES amqpcpp.h
HINTS ${AMQP_DIR}/include
)

FIND_LIBRARY(AMQP_LIBRARY
NAMES amqp-cpp
HINTS ${AMQP_DIR}/lib
)

SET(AMQP_PROCESS_INCLUDES AMQP_INCLUDE_DIR)
SET(AMQP_PROCESS_LIBS AMQP_LIBRARY)

include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(AMQP DEFAULT_MSG ${_AMQP_REQUIRED_VARS})
Loading

0 comments on commit 8063e6f

Please sign in to comment.