Build: Don't add libusb include until after libftdi

This fixes GH-46 and a regression caused by 82954d9 where the project
would fail to build until configured a second time on Unix-y platforms.

LibFTDI adds libusb, so we need to make sure that's included first.

Windows does not use libusb so it does not need the include directory.
add-device-sharing
Paul Hollinsky 2022-02-24 16:03:02 -05:00
parent 2c282fe396
commit f1d9be1a81
1 changed files with 1 additions and 1 deletions

View File

@ -205,7 +205,6 @@ 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)
@ -223,6 +222,7 @@ if(NOT WIN32)
set(FTDIPP OFF CACHE INTERNAL "")
set(FTDI_EEPROM OFF CACHE INTERNAL "")
add_subdirectory(third-party/libftdi)
target_include_directories(icsneocpp PRIVATE ${LIBUSB_INCLUDE_DIR})
endif(NOT WIN32)
# winpcap