Skip to content

Commit

Permalink
Fix missing headers in Debian package (#203)
Browse files Browse the repository at this point in the history
* test build package

* re-add pybind11 in ci

* apt install with sudo

* change example CMake dirs

* fix missing header installation
  • Loading branch information
pantor authored Dec 8, 2024
1 parent 2fb7781 commit beb713a
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 4 deletions.
25 changes: 24 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI
on: [push, pull_request]

jobs:
build:
build-and-test:
runs-on: ${{ matrix.os }}

strategy:
Expand Down Expand Up @@ -63,6 +63,29 @@ jobs:
ctest --test-dir ./build -T memcheck
build-package:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Configure and make
run: |
cmake -B build
cmake --build build -j2 -- package
- name: Install package
working-directory: build
run: sudo apt-get install ./ruckig-*.deb

- name: Test building examples
working-directory: examples
run: |
mv CMakeLists-installed.txt CMakeLists.txt
cmake -B build
cmake --build build -j2
lint-python:
runs-on: ubuntu-latest

Expand Down
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ if(BUILD_CLOUD_CLIENT)
target_sources(ruckig PRIVATE src/ruckig/cloud_client.cpp)
target_include_directories(ruckig PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/third_party>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/ruckig/third_party>
)
target_compile_definitions(ruckig PUBLIC WITH_CLOUD_CLIENT)
endif()
Expand Down Expand Up @@ -135,6 +135,9 @@ include(CMakePackageConfigHelpers)

# Install headers
install(DIRECTORY include/ruckig DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
if(BUILD_CLOUD_CLIENT)
install(DIRECTORY third_party/httplib third_party/nlohmann DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/ruckig/third_party)
endif()

# Install library
install(TARGETS ruckig
Expand Down
2 changes: 1 addition & 1 deletion examples/CMakeLists-directory.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ include_directories(include)
link_directories(lib)

# Build the position example
add_executable(example-position examples/01_position.cpp)
add_executable(example-position 01_position.cpp)
target_compile_features(example-position PUBLIC cxx_std_17)

target_link_libraries(example-position ruckig)
2 changes: 1 addition & 1 deletion examples/CMakeLists-installed.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ project(ruckig_examples)
find_package(ruckig REQUIRED)

# Build the position example
add_executable(example-position examples/01_position.cpp)
add_executable(example-position 01_position.cpp)
target_compile_features(example-position PUBLIC cxx_std_17)

target_link_libraries(example-position PRIVATE ruckig::ruckig)

0 comments on commit beb713a

Please sign in to comment.