Skip to content

Commit 9ac81db

Browse files
author
Erwin Jansen
committed
Adds documentation and installation
- Moved all headers to a single location so they can be installed - Removed C++11 extensions from headers - Seperated out public/private headers - Added doxygen - Updates and adds documentation - Fixed some memory leaks - Updated samples
1 parent 0653a75 commit 9ac81db

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2614
-353
lines changed

CMakeLists.txt

+13-13
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,11 @@ INCLUDE (CheckFunctionExists)
99

1010
LIST (APPEND CMAKE_MODULE_PATH "${TOOLS_DIRECTORY}/cmake/rpavlik")
1111
LIST (APPEND CMAKE_MODULE_PATH "${TOOLS_DIRECTORY}/cmake")
12+
LIST (APPEND CMAKE_MODULE_PATH "${TOOLS_DIRECTORY}/cmake/doxygen")
1213
INCLUDE(GetGitRevisionDescription)
1314
INCLUDE(cpplint)
1415
INCLUDE(CodeCoverage)
16+
INCLUDE(UseDoxygen)
1517

1618
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
1719
git_get_exact_tag(GIT_TAG)
@@ -25,7 +27,14 @@ ELSE ()
2527
SET (GIT_TAG "untagged")
2628
ENDIF (GIT_TAG)
2729

30+
2831
OPTION(ENABLE_GPERF_TOOLS "Enable google perftools [default: OFF]" OFF)
32+
OPTION(ENABLE_DOC "Enable documentation [default: ON]" ON)
33+
34+
35+
set(JWT_INSTALL_LIB_DIR lib CACHE PATH "Installation directory for libraries")
36+
set(JWT_INSTALL_BIN_DIR bin CACHE PATH "Installation directory for executables")
37+
set(JWT_INSTALL_INCLUDE_DIR include CACHE PATH "Installation directory for header files")
2938

3039
#
3140
# Compiler SETtings
@@ -50,8 +59,7 @@ MESSAGE ("-- Looking for jansson")
5059
UNSET(JANSSON)
5160
FIND_LIBRARY (JANSSON NAMES jansson)
5261
If (JANSSON)
53-
MESSAGE ("-- Jannson Already Available")
54-
MESSAGE ("-- ${JANSSON}")
62+
MESSAGE ("-- Jannson Already Available ${JANSSON}")
5563
ELSE (JANSSON)
5664
MESSAGE ("-- Missing jansson, building locally")
5765
# We are not really interested in the debug build of jannson
@@ -105,17 +113,9 @@ IF(ENABLE_GPERF_TOOLS MATCHES "ON")
105113
ENDIF(ENABLE_GPERF_TOOLS MATCHES "ON")
106114

107115

108-
# Coverage settings
109-
IF (COVERAGE AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
110-
SET (CMAKE_CXX_FLAGS "-fprofile-arcs -ftest-coverage")
111-
SET (CMAKE_CXX_LINK_FLAGS "${CMAKE_CXX_LINK_FLAGS} -fprofile-arcs -ftest-coverage")
112-
ADD_DEFINITIONS(-fprofile-arcs -ftest-coverage)
113-
LINK_LIBRARIES(gcov)
114-
ENDIF ()
115-
116116
# Search OpenSSL
117117
FIND_PACKAGE(PkgConfig REQUIRED)
118-
PKG_SEARCH_MODULE(OPENSSL REQUIRED openssl)
118+
PKG_SEARCH_MODULE(OPENSSL REQUIRED openssl openssl>=1.0.2)
119119

120120
IF(OPENSSL_FOUND)
121121
INCLUDE_DIRECTORIES(${OPENSSL_INCLUDE_DIRS})
@@ -125,14 +125,14 @@ ELSE()
125125
ENDIF()
126126

127127
# General include directories
128-
INCLUDE_DIRECTORIES (src)
128+
INCLUDE_DIRECTORIES (src/include/ src/include/private)
129129
INCLUDE_DIRECTORIES ( ${JANSSON_INCLUDE_DIRS} )
130130
LINK_DIRECTORIES (${OPENSSL_LIBRARY_DIRS})
131131
ADD_SUBDIRECTORY (src)
132132

133133
#-------------------
134134
# Test
135135
#-------------------
136-
ADD_SUBDIRECTORY (ext/gtest-1.7.0)
137136
ENABLE_TESTING (true)
137+
ADD_SUBDIRECTORY (ext/gtest-1.7.0)
138138
ADD_SUBDIRECTORY (test)

0 commit comments

Comments
 (0)