From 6cd821be2c79190cdd45d9e0bf28bdb19aee84b9 Mon Sep 17 00:00:00 2001 From: Paul Hollinsky Date: Thu, 24 Feb 2022 16:03:02 -0500 Subject: [PATCH] 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. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c07cc8f..df548c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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