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
parent
2c282fe396
commit
f1d9be1a81
|
|
@ -205,7 +205,6 @@ target_include_directories(icsneocpp
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/include
|
${CMAKE_CURRENT_SOURCE_DIR}/include
|
||||||
${LIBICSNEO_EXTENSION_INCLUDE_PATHS}
|
${LIBICSNEO_EXTENSION_INCLUDE_PATHS}
|
||||||
${LIBUSB_INCLUDE_DIR}
|
|
||||||
)
|
)
|
||||||
set_property(TARGET icsneocpp PROPERTY POSITION_INDEPENDENT_CODE ON)
|
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)
|
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(FTDIPP OFF CACHE INTERNAL "")
|
||||||
set(FTDI_EEPROM OFF CACHE INTERNAL "")
|
set(FTDI_EEPROM OFF CACHE INTERNAL "")
|
||||||
add_subdirectory(third-party/libftdi)
|
add_subdirectory(third-party/libftdi)
|
||||||
|
target_include_directories(icsneocpp PRIVATE ${LIBUSB_INCLUDE_DIR})
|
||||||
endif(NOT WIN32)
|
endif(NOT WIN32)
|
||||||
|
|
||||||
# winpcap
|
# winpcap
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue