Ensure Iconv is found when provided via CFLAGS/LDFLAGS #430
No reviewers
Labels
No labels
3rdparty
Android
API
Author does not respond
bsd
bug
build system/CI
ci-virtual-device
CMake
Contributions Welcome
Core
dependencies
device-specific
documentation
don't_merge
duplicate
enhancement
Example
Haiku
hidraw
hotplug
info required
invalid
libusb
macOS
Misc
Not an issue
question
Release
Test
Test GUI
Windows
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-libusb/hidapi!430
Loading…
Reference in a new issue
No description provided.
Delete branch "find_iconv"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
-liconv- we're checking if library is available in such way;Iconv::Iconv;Fixes: #429
Right now I don't have the environment to check this properly (except what is setup on CI).
@neheb can you check this as part of the openwrt build?
As soon as I get home.
nope:
Updated. This time I was able to test it partially.
Seems to have done it. A lot of work as compared to
though.
Not a lot of work, compared to uncompleted #426 :)
Besides, I'll ask CMake community, if this can be improved by CMake itself, even though openwrt CMake support is too incomplete as of yet.
Thanks for testing it.
@ -22,11 +22,53 @@ target_link_libraries(hidapi_libusb PRIVATE Threads::Threads)if(HIDAPI_NO_ICONV)I do agree CMake's Find_Iconv is not that great, Fixing it upstream would be good.
The OpenWrt comment is interesting. I don't really know what the "proper" way of handling cross compilation is like this. Although cmake.mk probably predates whatever "proper" is.
Let me share with you a few links, as a general reference:
So instead of specifying so many CMake arguments and environment varibales - a single additional CMake argument should be passed:
-DCMAKE_TOOLCHAIN_FILE=<toolchain for cross-compilation>;ndk/22.1.7171670/build/cmake/android.toolchain.cmake;BTW:
I'm successfully using with HIDAPI (and not only) in several of my projects.