Build: Associate libusb include dir with icsneocpp

If an external project links to the icsneocpp target and libusb has
been installed in a non-standard location, the build will fail to find
libusb.h because LIBUSB_INCLUDE_DIR is not associated with the
target.

Closes #57
pull/43/head
Kyle Schwarz 2021-09-20 21:31:13 -04:00
parent 68715d515d
commit 82954d9190
1 changed files with 1 additions and 1 deletions

View File

@ -203,6 +203,7 @@ target_include_directories(icsneocpp
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/include
${LIBICSNEO_EXTENSION_INCLUDE_PATHS}
${LIBUSB_INCLUDE_DIR}
)
set_property(TARGET icsneocpp PROPERTY POSITION_INDEPENDENT_CODE ON)
target_compile_features(icsneocpp PUBLIC cxx_auto_type cxx_constexpr cxx_lambdas cxx_nullptr cxx_range_for cxx_rvalue_references cxx_sizeof_member cxx_strong_enums)
@ -220,7 +221,6 @@ if(NOT WIN32)
set(FTDIPP OFF CACHE INTERNAL "")
set(FTDI_EEPROM OFF CACHE INTERNAL "")
add_subdirectory(third-party/libftdi)
include_directories(${LIBUSB_INCLUDE_DIR})
endif(NOT WIN32)
# winpcap