Skip to content

Commit

Permalink
Add pkg-config file
Browse files Browse the repository at this point in the history
  • Loading branch information
SoapGentoo committed Mar 11, 2018
1 parent b2aecf8 commit c184bd9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,8 @@ foreach(h ${PUBLIC_HEADERS})
get_filename_component(FINAL_PATH ${h} PATH) # use DIRECTORY instead of PATH once requiring CMake 3.0
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/${h} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${FINAL_PATH} COMPONENT "headers")
endforeach()

if (NOT WIN32)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/cppcodec.pc.in ${CMAKE_CURRENT_BINARY_DIR}/cppcodec-1.pc @ONLY)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cppcodec-1.pc DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/pkgconfig)
endif()
7 changes: 7 additions & 0 deletions cppcodec.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@

Name: @CMAKE_PROJECT_NAME@
Description: C++ header-only library to encode/decode base64, base64url, base32, base32hex and hex
URL: https://github.com/tplgy/cppcodec
Version: @PROJECT_VERSION@
Cflags: -I${includedir}

0 comments on commit c184bd9

Please sign in to comment.