summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/CMakeLists.txt2
-rw-r--r--librabbitmq/CMakeLists.txt21
-rw-r--r--librabbitmq/amqp.h5
-rw-r--r--librabbitmq/codegen.py2
4 files changed, 26 insertions, 4 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
index 8b58e8b..d5ea525 100644
--- a/examples/CMakeLists.txt
+++ b/examples/CMakeLists.txt
@@ -1,4 +1,4 @@
-include_directories(${librabbitmq_SOURCE_DIR} ${librabbitmq_BINARY_DIR})
+include_directories(${LIBRABBITMQ_INCLUDE_DIRS})
if (WIN32)
set(PLATFORM_DIR windows)
diff --git a/librabbitmq/CMakeLists.txt b/librabbitmq/CMakeLists.txt
index 80632ed..1608ae8 100644
--- a/librabbitmq/CMakeLists.txt
+++ b/librabbitmq/CMakeLists.txt
@@ -49,10 +49,25 @@ else(WIN32)
endif(WIN32)
if(MSVC)
- set(MSINTTYPES_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/../msinttypes")
+ if(MSVC_VERSION LESS 1600)
+ set(MSINTTYPES_INCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/../msinttypes")
+ set(STDINT_H_INSTALL_FILE "${CMAKE_CURRENT_SOURCE_DIR}/../msinttypes/stdint.h")
+ endif(MSVC_VERSION LESS 1600)
endif(MSVC)
-include_directories(${SOCKET_IMPL} ${MSINTTYPES_INCLUDE})
+set(LIBRABBITMQ_INCLUDE_DIRS
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${SOCKET_IMPL}
+ ${MSINTTYPES_INCLUDE}
+ )
+
+include_directories(${LIBRABBITMQ_INCLUDE_DIRS})
+
+set(LIBRABBITMQ_INCLUDE_DIRS
+ ${LIBRABBITMQ_INCLUDE_DIRS}
+ PARENT_SCOPE)
+
add_definitions(-DBUILDING_LIBRABBITMQ)
set(RABBITMQ_SOURCES
@@ -76,7 +91,7 @@ install(TARGETS rabbitmq
ARCHIVE DESTINATION lib
PUBLIC_HEADER DESTINATION include)
-install(FILES amqp.h ${CMAKE_CURRENT_BINARY_DIR}/amqp_framing.h
+install(FILES amqp.h ${CMAKE_CURRENT_BINARY_DIR}/amqp_framing.h ${STDINT_H_INSTALL_FILE}
DESTINATION include)
diff --git a/librabbitmq/amqp.h b/librabbitmq/amqp.h
index e4e97ee..8b91cdc 100644
--- a/librabbitmq/amqp.h
+++ b/librabbitmq/amqp.h
@@ -33,6 +33,9 @@
* ***** END LICENSE BLOCK *****
*/
+#include <stdint.h>
+#include <stddef.h>
+
#ifdef __cplusplus
extern "C" {
#endif
@@ -407,4 +410,6 @@ RABBITMQ_EXPORT int amqp_parse_url(char *url,
}
#endif
+#include <amqp_framing.h>
+
#endif
diff --git a/librabbitmq/codegen.py b/librabbitmq/codegen.py
index b29c68d..67255a6 100644
--- a/librabbitmq/codegen.py
+++ b/librabbitmq/codegen.py
@@ -554,6 +554,8 @@ def genHrl(spec):
#ifndef librabbitmq_amqp_framing_h
#define librabbitmq_amqp_framing_h
+#include <amqp.h>
+
#ifdef __cplusplus
extern "C" {
#endif