diff --git a/CMakeLists.txt b/CMakeLists.txt index 09e9a01..94e56de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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} +) diff --git a/ypspur.pc.in b/ypspur.pc.in new file mode 100644 index 0000000..bee1184 --- /dev/null +++ b/ypspur.pc.in @@ -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}