Browse Source

Add lokimq compatibility headers

pull/31/head
Jason Rhinelander 11 months ago
parent
commit
0738695eb9
  1. 35
      CMakeLists.txt
  2. 13
      liblokimq.pc.in
  3. 4
      lokimq/address.h
  4. 4
      lokimq/auth.h
  5. 4
      lokimq/base32z.h
  6. 4
      lokimq/base64.h
  7. 4
      lokimq/batch.h
  8. 4
      lokimq/bt_serialize.h
  9. 4
      lokimq/bt_value.h
  10. 4
      lokimq/connections.h
  11. 4
      lokimq/hex.h
  12. 10
      lokimq/lokimq.h
  13. 4
      lokimq/message.h
  14. 2
      lokimq/variant.h
  15. 4
      lokimq/version.h

35
CMakeLists.txt

@ -31,11 +31,16 @@ endif()
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_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")
configure_file(oxenmq/version.h.in oxenmq/version.h @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
oxenmq/address.cpp
@ -141,6 +146,9 @@ else()
endif()
add_library(oxenmq::oxenmq ALIAS oxenmq)
if(OXENMQ_LOKIMQ_COMPAT)
add_library(lokimq::lokimq ALIAS oxenmq)
endif()
export(
TARGETS oxenmq
@ -185,6 +193,33 @@ if(OXENMQ_INSTALL)
FILES ${CMAKE_CURRENT_BINARY_DIR}/liboxenmq.pc
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()
if(OXENMQ_BUILD_TESTS)

13
liblokimq.pc.in

@ -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}

4
lokimq/address.h

@ -0,0 +1,4 @@
#pragma once
#include "../oxenmq/address.h"
namespace lokimq = oxenmq;

4
lokimq/auth.h

@ -0,0 +1,4 @@
#pragma once
#include "../oxenmq/auth.h"
namespace lokimq = oxenmq;

4
lokimq/base32z.h

@ -0,0 +1,4 @@
#pragma once
#include "../oxenmq/base32z.h"
namespace lokimq = oxenmq;

4
lokimq/base64.h

@ -0,0 +1,4 @@
#pragma once
#include "../oxenmq/base64.h"
namespace lokimq = oxenmq;

4
lokimq/batch.h

@ -0,0 +1,4 @@
#pragma once
#include "../oxenmq/batch.h"
namespace lokimq = oxenmq;

4
lokimq/bt_serialize.h

@ -0,0 +1,4 @@
#pragma once
#include "../oxenmq/bt_serialize.h"
namespace lokimq = oxenmq;

4
lokimq/bt_value.h

@ -0,0 +1,4 @@
#pragma once
#include "../oxenmq/bt_value.h"
namespace lokimq = oxenmq;

4
lokimq/connections.h

@ -0,0 +1,4 @@
#pragma once
#include "../oxenmq/connections.h"
namespace lokimq = oxenmq;

4
lokimq/hex.h

@ -0,0 +1,4 @@
#pragma once
#include "../oxenmq/hex.h"
namespace lokimq = oxenmq;

10
lokimq/lokimq.h

@ -0,0 +1,10 @@
#pragma once
#include "../oxenmq/oxenmq.h"
namespace lokimq = oxenmq;
namespace oxenmq {
using LokiMQ = OxenMQ;
}

4
lokimq/message.h

@ -0,0 +1,4 @@
#pragma once
#include "../oxenmq/message.h"
namespace lokimq = oxenmq;

2
lokimq/variant.h

@ -0,0 +1,2 @@
#pragma once
#include "../oxenmq/variant.h"

4
lokimq/version.h

@ -0,0 +1,4 @@
#pragma once
#include "../oxenmq/version.h"
namespace lokimq = oxenmq;
Loading…
Cancel
Save