Skip to content

Commit 198032e

Browse files
Fix installed include path export
Export both installed include roots so downstream consumers can use the public cddp-cpp header layout while existing internal quoted includes keep working. Strengthen the package smoke test to compile against installed cddp-cpp headers directly.
1 parent 2bad33b commit 198032e

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ endif()
186186

187187
target_include_directories(${PROJECT_NAME} PUBLIC
188188
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/cddp-cpp>
189+
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
189190
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/cddp-cpp>
190191
)
191192

tests/package_smoke/main.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
#include "cddp.hpp"
1+
#include <cddp-cpp/cddp.hpp>
2+
#include <cddp-cpp/cddp_core/helper.hpp>
23

3-
int main() { return 0; }
4+
int main() {
5+
const auto finite = cddp::finite_difference_jacobian(
6+
[](const Eigen::VectorXd &x) { return x; }, Eigen::VectorXd::Zero(1));
7+
return finite.rows() == 1 ? 0 : 1;
8+
}

0 commit comments

Comments
 (0)