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.
This commit is contained in:
Paul Hollinsky
2022-02-24 16:03:02 -05:00
parent 6cc0f08e2b
commit 6cd821be2c
+1 -1
View File
@@ -207,7 +207,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)
@@ -225,6 +224,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