Skip to content

Commit 69c324e

Browse files
author
Jonas Platte
committed
Added Version definition to the pkg-config file
1 parent 263a470 commit 69c324e

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ IF(NOT WIN32)
1414
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel Coverage."
1515
FORCE)
1616
ENDIF(NOT CMAKE_BUILD_TYPE)
17-
ENDIF(NOT WIN32)
17+
ENDIF(NOT WIN32)
1818

1919
# This ensures shared DLL are in the same dir as executable on Windows.
2020
# Put all executables / libraries are in a project global directory.
@@ -29,12 +29,12 @@ MARK_AS_ADVANCED( CMAKE_RUNTIME_OUTPUT_DIRECTORY CMAKE_LIBRARY_OUTPUT_DIRECTORY
2929
# Set variable named ${VAR_NAME} to value ${VALUE}
3030
FUNCTION(set_using_dynamic_name VAR_NAME VALUE)
3131
SET( "${VAR_NAME}" "${VALUE}" PARENT_SCOPE)
32-
ENDFUNCTION(set_using_dynamic_name)
32+
ENDFUNCTION(set_using_dynamic_name)
3333

3434
# Extract major, minor, patch and qualifier from version text
3535
# Parse a version string "X.Y.Z[-qualifier]" and outputs
3636
# version parts in ${OUPUT_PREFIX}_MAJOR, _MINOR, _PATCH, _QUALIFIER.
37-
# If parse succed then ${OUPUT_PREFIX}_FOUND is TRUE.
37+
# If parse succeeds then ${OUPUT_PREFIX}_FOUND is TRUE.
3838
MACRO(jsoncpp_parse_version VERSION_TEXT OUPUT_PREFIX)
3939
SET(VERSION_REGEX "[0-9]+\\.[0-9]+\\.[0-9]+(-[a-zA-Z0-9_]+)?")
4040
IF( ${VERSION_TEXT} MATCHES ${VERSION_REGEX} )
@@ -44,9 +44,9 @@ MACRO(jsoncpp_parse_version VERSION_TEXT OUPUT_PREFIX)
4444
LIST(GET VERSION_PARTS 1 ${OUPUT_PREFIX}_MINOR)
4545
LIST(GET VERSION_PARTS 2 ${OUPUT_PREFIX}_PATCH)
4646
LIST(GET VERSION_PARTS 3 ${OUPUT_PREFIX}_QUALIFIER)
47-
set_using_dynamic_name( "${OUPUT_PREFIX}_FOUND" TRUE )
47+
set_using_dynamic_name( "${OUPUT_PREFIX}_FOUND" TRUE )
4848
ELSE( ${VERSION_TEXT} MATCHES ${VERSION_REGEX} )
49-
set_using_dynamic_name( "${OUPUT_PREFIX}_FOUND" FALSE )
49+
set_using_dynamic_name( "${OUPUT_PREFIX}_FOUND" FALSE )
5050
ENDIF( ${VERSION_TEXT} MATCHES ${VERSION_REGEX} )
5151
ENDMACRO(jsoncpp_parse_version)
5252

@@ -69,7 +69,7 @@ macro(UseCompilationWarningAsError)
6969
# warnings when compiled in release configuration.
7070
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /WX ")
7171
endif( MSVC )
72-
endmacro()
72+
endmacro()
7373

7474
# Include our configuration header
7575
INCLUDE_DIRECTORIES( ${jsoncpp_SOURCE_DIR}/include )

pkg-config/jsoncpp.pc.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ includedir=${prefix}/include
55

66
Name: jsoncpp
77
Description: A C++ library for interacting with JSON
8+
Version: @JSONCPP_VERSION@
89
URL: https://github.com/open-source-parsers/jsoncpp
910
Libs: -L${libdir} -ljsoncpp
1011
Cflags: -I${includedir}

0 commit comments

Comments
 (0)