Skip to content

Commit

Permalink
Generate and install pkg-config file (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
at-wat authored Apr 29, 2019
1 parent 4fb5b6d commit 39dd542
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
17 changes: 17 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -335,3 +335,20 @@ install(
package.xml
DESTINATION share/ypspur/
)


# Generate pkgconfig file and install

configure_file(ypspur.pc.in
${PROJECT_BINARY_DIR}/ypspur.pc @ONLY
)

set(
PKGCONFIG_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/pkgconfig
CACHE PATH "Install directory of pkgconfig file"
)
install(
FILES
${PROJECT_BINARY_DIR}/ypspur.pc
DESTINATION ${PKGCONFIG_INSTALL_DIR}
)
11 changes: 11 additions & 0 deletions ypspur.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include

Name: ypspur
Description: A mobile robot motion control library
Version: @PROJECT_VERSION@

Libs: -L${libdir} -lypspur
Cflags: -I${includedir}

0 comments on commit 39dd542

Please sign in to comment.