diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 51d06110..aa03b305 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -175,23 +175,21 @@ SET(HEADERS # Create a single library for the project add_library(geometry-central ${SRCS} ${HEADERS}) -# Public headers include vendored headers directly, so build-tree consumers need -# those include roots explicitly. The install tree collapses them under the -# single installed include directory. target_include_directories(geometry-central PUBLIC $ - $ - $ - $ + $) + +target_link_libraries(geometry-central + PUBLIC + $ + $ PRIVATE - "${CMAKE_CURRENT_SOURCE_DIR}/../deps/nanoflann/include" - "${CMAKE_CURRENT_SOURCE_DIR}/../deps/nanort/include" -) + $ + $) -# Keep Eigen out of the exported build-tree link interface to avoid exporting the -# local helper target created in deps/CMakeLists.txt. The installed package adds -# Eigen3::Eigen back after calling find_dependency(Eigen3). +# Keep build-tree dependency targets out of the installed export. The installed +# package adds Eigen3::Eigen back after calling find_dependency(Eigen3). # Set compiler properties for the library target_compile_features(geometry-central PUBLIC cxx_std_11)