This repository was archived by the owner on Jan 10, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +22
-3
lines changed
Expand file tree Collapse file tree 2 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ add_subdirectory(tests)
99# set up versioning.
1010set (BUILD_MAJOR "1" )
1111set (BUILD_MINOR "0" )
12- set (BUILD_VERSION "13 " )
12+ set (BUILD_VERSION "14 " )
1313set (BUILD_VERSION ${BUILD_MAJOR} .${BUILD_MINOR} .${BUILD_VERSION} )
1414
1515set (CMAKE_C_STANDARD 11)
@@ -40,5 +40,18 @@ install(
4040 DESTINATION ${BASEENCODE_INC_DIR}
4141)
4242
43+ # Allow adding prefix if CMAKE_INSTALL_INCLUDEDIR not absolute.
44+ if (IS_ABSOLUTE "${CMAKE_INSTALL_INCLUDEDIR} " )
45+ set (PKGCONFIG_TARGET_INCLUDES "${CMAKE_INSTALL_INCLUDEDIR} " )
46+ else ()
47+ set (PKGCONFIG_TARGET_INCLUDES "\$ {prefix}/${CMAKE_INSTALL_INCLUDEDIR} " )
48+ endif ()
49+ # Allow adding prefix if CMAKE_INSTALL_LIBDIR not absolute.
50+ if (IS_ABSOLUTE "${CMAKE_INSTALL_LIBDIR} " )
51+ set (PKGCONFIG_TARGET_LIBS "${CMAKE_INSTALL_LIBDIR} " )
52+ else ()
53+ set (PKGCONFIG_TARGET_LIBS "\$ {exec_prefix}/${CMAKE_INSTALL_LIBDIR} " )
54+ endif ()
55+
4356configure_file ("baseencode.pc.in" "baseencode.pc" @ONLY )
4457install (FILES "${CMAKE_CURRENT_BINARY_DIR} /baseencode.pc" DESTINATION ${CMAKE_INSTALL_LIBDIR} /pkgconfig/)
Original file line number Diff line number Diff line change 1+ prefix=@CMAKE_INSTALL_PREFIX@
2+ exec_prefix=${prefix}
3+ libdir=@PKGCONFIG_TARGET_LIBS@
4+ includedir=@PKGCONFIG_TARGET_INCLUDES@
5+
16Name: libbaseencode
27Description: C library for encoding and decoding data using base32 or base64
38Version: @BUILD_VERSION@
4- Libs: -L@CMAKE_INSTALL_PREFIX@/@BASEENCODE_LIB_DIR@ -lbaseencode
5- Cflags: -I@CMAKE_INSTALL_PREFIX@/@BASEENCODE_INC_DIR@
9+ URL: https://github.com/paolostivanin/libbaseencode
10+ Libs: -L${libdir} -lbaseencode
11+ Cflags: -I${includedir}
You can’t perform that action at this time.
0 commit comments