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 #57v0.3.0-dev
parent
1b13e2d6a4
commit
80c6816a54
|
|
@ -203,6 +203,7 @@ 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)
|
||||||
|
|
@ -220,7 +221,6 @@ 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)
|
||||||
include_directories(${LIBUSB_INCLUDE_DIR})
|
|
||||||
endif(NOT WIN32)
|
endif(NOT WIN32)
|
||||||
|
|
||||||
# winpcap
|
# winpcap
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue