From 82954d9190938c33f91e2b03c81c2f964cc427ce Mon Sep 17 00:00:00 2001 From: Kyle Schwarz Date: Mon, 20 Sep 2021 21:31:13 -0400 Subject: [PATCH] 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 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7cc3dcc..d03bef2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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