setting cppzmq version to the one of libzmq

This commit is contained in:
Johan Mabille 2017-01-10 18:10:09 +01:00
parent 33e9ab3bae
commit 15936cde8c
2 changed files with 1 additions and 13 deletions

View File

@ -3,15 +3,7 @@ project(cppzmq)
find_package(ZeroMQ REQUIRED)
file(STRINGS "${CMAKE_CURRENT_SOURCE_DIR}/zmq.hpp" cppzmq_version_defines
REGEX "#define CPPZMQ_VERSION_(MAJOR|MINOR|PATCH)")
foreach(ver ${cppzmq_version_defines})
if(ver MATCHES "#define CPPZMQ_VERSION_(MAJOR|MINOR|PATCH) +([^ ]+)$")
set(CPPZMQ_VERSION_${CMAKE_MATCH_1} "${CMAKE_MATCH_2}" CACHE INTERNAL "")
endif()
endforeach()
set(${PROJECT_NAME}_VERSION
${CPPZMQ_VERSION_MAJOR}.${CPPZMQ_VERSION_MINOR}.${CPPZMQ_VERSION_PATCH})
set (${PROJECT_NAME}_VERSION ${ZeroMQ_VERSION})
message(STATUS "cppzmq v${${PROJECT_NAME}_VERSION}")
set(CPPZMQ_HEADERS

View File

@ -107,10 +107,6 @@ typedef struct {
# define ZMQ_ASSERT(expression) (void)(expression)
#endif
#define CPPZMQ_VERSION_MAJOR 1
#define CPPZMQ_VERSION_MINOR 0
#define CPPZMQ_VERSION_PATCH 0
namespace zmq
{