Skip to content

Commit

Permalink
Add pkgconfig file
Browse files Browse the repository at this point in the history
  • Loading branch information
tintou authored and xuhdev committed Mar 15, 2018
1 parent 5de0463 commit ab08816
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/lib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,10 @@ install(TARGETS editorconfig_shared editorconfig_static
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})

configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/editorconfig.pc.in
${CMAKE_CURRENT_BINARY_DIR}/editorconfig.pc
@ONLY)

install(FILES ${CMAKE_CURRENT_BINARY_DIR}/editorconfig.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
9 changes: 9 additions & 0 deletions src/lib/editorconfig.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
prefix=@CMAKE_INSTALL_PREFIX@
libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@/editorconfig

Name: editorconfig
Description: Library handling EditorConfig files, a file format defining coding styles in projects.
Version: @editorconfig_VERSION_MAJOR@.@editorconfig_VERSION_MINOR@.@editorconfig_VERSION_PATCH@
Libs: -L${libdir} -leditorconfig
Cflags: -I${includedir}

0 comments on commit ab08816

Please sign in to comment.