forked from pocoproject/poco
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d25b665
commit 6c82801
Showing
29 changed files
with
2,739 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Sources | ||
file(GLOB SRCS_G "src/*.cpp") | ||
POCO_SOURCES_AUTO( SRCS ${SRCS_G}) | ||
|
||
# Headers | ||
file(GLOB_RECURSE HDRS_G "include/*.h" ) | ||
POCO_HEADERS_AUTO( SRCS ${HDRS_G}) | ||
|
||
# Version Resource | ||
if(MSVC AND NOT POCO_STATIC) | ||
source_group("Resources" FILES ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||
list(APPEND SRCS ${CMAKE_SOURCE_DIR}/DLLVersion.rc) | ||
endif() | ||
|
||
add_library(JWT ${SRCS} ) | ||
add_library(Poco::JWT ALIAS JWT) | ||
set_target_properties( JWT | ||
PROPERTIES | ||
VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} | ||
OUTPUT_NAME PocoJWT | ||
DEFINE_SYMBOL JWT_EXPORTS | ||
) | ||
|
||
target_link_libraries(JWT PUBLIC Poco::JSON Poco::Crypto) | ||
target_include_directories(JWT | ||
PUBLIC | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> | ||
$<INSTALL_INTERFACE:include> | ||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/src | ||
) | ||
|
||
POCO_INSTALL(JWT) | ||
POCO_GENERATE_PACKAGE(JWT) | ||
|
||
if (ENABLE_TESTS) | ||
add_subdirectory(testsuite) | ||
endif () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# | ||
# Makefile | ||
# | ||
# Makefile for Poco JWT | ||
# | ||
|
||
include $(POCO_BASE)/build/rules/global | ||
|
||
objects = Token Signer Serializer JWTException | ||
|
||
target = PocoJWT | ||
target_version = $(LIBVERSION) | ||
target_libs = PocoCrypto PocoJSON PocoFoundation | ||
|
||
include $(POCO_BASE)/build/rules/lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
include(CMakeFindDependencyMacro) | ||
find_dependency(PocoFoundation) | ||
find_dependency(PocoJSON) | ||
find_dependency(PocoCrypto) | ||
include("${CMAKE_CURRENT_LIST_DIR}/PocoJWTTargets.cmake") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
// | ||
// JWT.h | ||
// | ||
// Library: JWT | ||
// Package: JWT | ||
// Module: JWT | ||
// | ||
// Basic definitions for the Poco JWT library. | ||
// This file must be the first file included by every other JWT | ||
// header file. | ||
// | ||
// Copyright (c) 2019, Applied Informatics Software Engineering GmbH. | ||
// and Contributors. | ||
// | ||
// SPDX-License-Identifier: BSL-1.0 | ||
// | ||
|
||
|
||
#ifndef JWT_JWT_INCLUDED | ||
#define JWT_JWT_INCLUDED | ||
|
||
|
||
#include "Poco/Foundation.h" | ||
|
||
|
||
// | ||
// The following block is the standard way of creating macros which make exporting | ||
// from a DLL simpler. All files within this DLL are compiled with the JWT_EXPORTS | ||
// symbol defined on the command line. this symbol should not be defined on any project | ||
// that uses this DLL. This way any other project whose source files include this file see | ||
// JWT_API functions as being imported from a DLL, whereas this DLL sees symbols | ||
// defined with this macro as being exported. | ||
// | ||
#if defined(_WIN32) && defined(POCO_DLL) | ||
#if defined(JWT_EXPORTS) | ||
#define JWT_API __declspec(dllexport) | ||
#else | ||
#define JWT_API __declspec(dllimport) | ||
#endif | ||
#endif | ||
|
||
|
||
#if !defined(JWT_API) | ||
#if !defined(POCO_NO_GCC_API_ATTRIBUTE) && defined (__GNUC__) && (__GNUC__ >= 4) | ||
#define JWT_API __attribute__ ((visibility ("default"))) | ||
#else | ||
#define JWT_API | ||
#endif | ||
#endif | ||
|
||
|
||
// | ||
// Automatically link JWT library. | ||
// | ||
#if defined(_MSC_VER) | ||
#if !defined(POCO_NO_AUTOMATIC_LIBS) && !defined(JWT_EXPORTS) | ||
#pragma comment(lib, "PocoJWT" POCO_LIB_SUFFIX) | ||
#endif | ||
#endif | ||
|
||
|
||
#endif // JWT_JWT_INCLUDED |
Oops, something went wrong.