Skip to content

Commit

Permalink
Added install steps
Browse files Browse the repository at this point in the history
  • Loading branch information
jdavidberger committed Dec 28, 2021
1 parent 738c0b5 commit 4109def
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: recursive
- if: contains(matrix.os, 'ubuntu')
name: Get Dependencies
Expand Down
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,9 @@ if(ENABLE_TESTS)
endif()


install(DIRECTORY include/cnkalman DESTINATION include)
include(GNUInstallDirs)
configure_file(cnkalman.pc.in cnkalman.pc @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/cnkalman.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")


10 changes: 10 additions & 0 deletions cnkalman.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=@CMAKE_INSTALL_PREFIX@
libdir=${exec_prefix}/@CMAKE_INSTALL_LIBDIR@
includedir=${prefix}/include/cnkalman

Name: @CMAKE_PROJECT_NAME@
Description: A C and C++ extended kalman filter library
Version: 0
Libs: -L${libdir} -lcnkalman @EXTRA_LIBS@
Cflags: -I${includedir} -I${includedir}/redist
2 changes: 1 addition & 1 deletion libs/cnmatrix
3 changes: 3 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ target_include_directories(cnkalman PUBLIC
)

target_link_libraries(cnkalman cnmatrix)


install(TARGETS cnkalman DESTINATION lib)

0 comments on commit 4109def

Please sign in to comment.