mirror of https://github.com/oxen-io/oxen-mq.git
Add lokimq compatibility headers
This commit is contained in:
parent
2ae6b96016
commit
0738695eb9
|
@ -31,11 +31,16 @@ endif()
|
||||||
option(OXENMQ_BUILD_TESTS "Building and perform oxenmq tests" ${oxenmq_IS_TOPLEVEL_PROJECT})
|
option(OXENMQ_BUILD_TESTS "Building and perform oxenmq tests" ${oxenmq_IS_TOPLEVEL_PROJECT})
|
||||||
option(OXENMQ_INSTALL "Add oxenmq libraries and headers to cmake install target; defaults to ON if BUILD_SHARED_LIBS is enabled or we are the top-level project; OFF for a static subdirectory build" ${oxenmq_INSTALL_DEFAULT})
|
option(OXENMQ_INSTALL "Add oxenmq libraries and headers to cmake install target; defaults to ON if BUILD_SHARED_LIBS is enabled or we are the top-level project; OFF for a static subdirectory build" ${oxenmq_INSTALL_DEFAULT})
|
||||||
option(OXENMQ_INSTALL_CPPZMQ "Install cppzmq header with oxenmq/ headers (requires OXENMQ_INSTALL)" ON)
|
option(OXENMQ_INSTALL_CPPZMQ "Install cppzmq header with oxenmq/ headers (requires OXENMQ_INSTALL)" ON)
|
||||||
|
option(OXENMQ_LOKIMQ_COMPAT "Install lokimq compatibility headers and pkg-config for rename migration" ON)
|
||||||
|
|
||||||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
|
||||||
|
|
||||||
configure_file(oxenmq/version.h.in oxenmq/version.h @ONLY)
|
configure_file(oxenmq/version.h.in oxenmq/version.h @ONLY)
|
||||||
configure_file(liboxenmq.pc.in liboxenmq.pc @ONLY)
|
configure_file(liboxenmq.pc.in liboxenmq.pc @ONLY)
|
||||||
|
if(OXENMQ_LOKIMQ_COMPAT)
|
||||||
|
configure_file(liblokimq.pc.in liblokimq.pc @ONLY)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
add_library(oxenmq
|
add_library(oxenmq
|
||||||
oxenmq/address.cpp
|
oxenmq/address.cpp
|
||||||
|
@ -141,6 +146,9 @@ else()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(oxenmq::oxenmq ALIAS oxenmq)
|
add_library(oxenmq::oxenmq ALIAS oxenmq)
|
||||||
|
if(OXENMQ_LOKIMQ_COMPAT)
|
||||||
|
add_library(lokimq::lokimq ALIAS oxenmq)
|
||||||
|
endif()
|
||||||
|
|
||||||
export(
|
export(
|
||||||
TARGETS oxenmq
|
TARGETS oxenmq
|
||||||
|
@ -185,6 +193,33 @@ if(OXENMQ_INSTALL)
|
||||||
FILES ${CMAKE_CURRENT_BINARY_DIR}/liboxenmq.pc
|
FILES ${CMAKE_CURRENT_BINARY_DIR}/liboxenmq.pc
|
||||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(OXENMQ_LOKIMQ_COMPAT)
|
||||||
|
install(
|
||||||
|
FILES lokimq/address.h
|
||||||
|
lokimq/auth.h
|
||||||
|
lokimq/base32z.h
|
||||||
|
lokimq/base64.h
|
||||||
|
lokimq/batch.h
|
||||||
|
lokimq/bt_serialize.h
|
||||||
|
lokimq/bt_value.h
|
||||||
|
lokimq/connections.h
|
||||||
|
lokimq/hex.h
|
||||||
|
lokimq/lokimq.h
|
||||||
|
lokimq/message.h
|
||||||
|
lokimq/string_view.h
|
||||||
|
lokimq/variant.h
|
||||||
|
lokimq/version.h
|
||||||
|
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/lokimq
|
||||||
|
)
|
||||||
|
|
||||||
|
install(
|
||||||
|
FILES ${CMAKE_CURRENT_BINARY_DIR}/liblokimq.pc
|
||||||
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(OXENMQ_BUILD_TESTS)
|
if(OXENMQ_BUILD_TESTS)
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
prefix=@CMAKE_INSTALL_PREFIX@
|
||||||
|
exec_prefix=${prefix}
|
||||||
|
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
|
||||||
|
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
|
||||||
|
|
||||||
|
Name: liblokimq
|
||||||
|
Description: ZeroMQ-based communication library (compatibility package for liboxenmq)
|
||||||
|
Version: @OXENMQ_VERSION@
|
||||||
|
|
||||||
|
Libs: -L${libdir} -loxenmq
|
||||||
|
Libs.private: @PRIVATE_LIBS@
|
||||||
|
Requires.private: libzmq libsodium
|
||||||
|
Cflags: -I${includedir}
|
|
@ -0,0 +1,4 @@
|
||||||
|
#pragma once
|
||||||
|
#include "../oxenmq/address.h"
|
||||||
|
|
||||||
|
namespace lokimq = oxenmq;
|
|
@ -0,0 +1,4 @@
|
||||||
|
#pragma once
|
||||||
|
#include "../oxenmq/auth.h"
|
||||||
|
|
||||||
|
namespace lokimq = oxenmq;
|
|
@ -0,0 +1,4 @@
|
||||||
|
#pragma once
|
||||||
|
#include "../oxenmq/base32z.h"
|
||||||
|
|
||||||
|
namespace lokimq = oxenmq;
|
|
@ -0,0 +1,4 @@
|
||||||
|
#pragma once
|
||||||
|
#include "../oxenmq/base64.h"
|
||||||
|
|
||||||
|
namespace lokimq = oxenmq;
|
|
@ -0,0 +1,4 @@
|
||||||
|
#pragma once
|
||||||
|
#include "../oxenmq/batch.h"
|
||||||
|
|
||||||
|
namespace lokimq = oxenmq;
|
|
@ -0,0 +1,4 @@
|
||||||
|
#pragma once
|
||||||
|
#include "../oxenmq/bt_serialize.h"
|
||||||
|
|
||||||
|
namespace lokimq = oxenmq;
|
|
@ -0,0 +1,4 @@
|
||||||
|
#pragma once
|
||||||
|
#include "../oxenmq/bt_value.h"
|
||||||
|
|
||||||
|
namespace lokimq = oxenmq;
|
|
@ -0,0 +1,4 @@
|
||||||
|
#pragma once
|
||||||
|
#include "../oxenmq/connections.h"
|
||||||
|
|
||||||
|
namespace lokimq = oxenmq;
|
|
@ -0,0 +1,4 @@
|
||||||
|
#pragma once
|
||||||
|
#include "../oxenmq/hex.h"
|
||||||
|
|
||||||
|
namespace lokimq = oxenmq;
|
|
@ -0,0 +1,10 @@
|
||||||
|
#pragma once
|
||||||
|
#include "../oxenmq/oxenmq.h"
|
||||||
|
|
||||||
|
namespace lokimq = oxenmq;
|
||||||
|
|
||||||
|
namespace oxenmq {
|
||||||
|
|
||||||
|
using LokiMQ = OxenMQ;
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
#pragma once
|
||||||
|
#include "../oxenmq/message.h"
|
||||||
|
|
||||||
|
namespace lokimq = oxenmq;
|
|
@ -0,0 +1,2 @@
|
||||||
|
#pragma once
|
||||||
|
#include "../oxenmq/variant.h"
|
|
@ -0,0 +1,4 @@
|
||||||
|
#pragma once
|
||||||
|
#include "../oxenmq/version.h"
|
||||||
|
|
||||||
|
namespace lokimq = oxenmq;
|
Loading…
Reference in New Issue