Skip to content

Commit

Permalink
set basic include path
Browse files Browse the repository at this point in the history
  • Loading branch information
j042 committed Jan 3, 2024
1 parent 8d2a13e commit 7fcba64
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ set(CXX_HEADERS src/napf.hpp)
add_library(napf INTERFACE)
add_library(napf::napf ALIAS napf)

# basic path
target_include_directories(napf
INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src>
$<INSTALL_INTERFACE:${incl_dest}>)

# try to use installed nanoflann.
# else, include the one in the third_party
find_package(nanoflann QUIET)
Expand All @@ -38,9 +44,7 @@ else()
set(CXX_HEADERS ${CXX_HEADERS} third_party/nanoflann.hpp)
target_include_directories(napf
INTERFACE
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src>
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/third_party>
$<INSTALL_INTERFACE:${incl_dest}>)
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/third_party>)
endif()
target_compile_features(napf INTERFACE cxx_std_11)

Expand Down

0 comments on commit 7fcba64

Please sign in to comment.