doc: Shared+Static build for CMake #517

Merged
Youw merged 3 commits from build-readme into master 2023-03-13 05:42:34 -05:00
Youw commented 2023-03-12 09:47:24 -05:00 (Migrated from github.com)

Document the recommended way to build both Shared and Static libraries of HIDAPI using CMake.

Closes: #424

Document the recommended way to build both Shared and Static libraries of HIDAPI using CMake. Closes: #424
Youw (Migrated from github.com) reviewed 2023-03-13 05:38:21 -05:00
@ -233,3 +233,48 @@ Advanced:
target_compile_definitions(hidapi_libusb PRIVATE NO_ICONV)
Youw (Migrated from github.com) commented 2023-03-13 05:38:20 -05:00
CMake doesn't have such option of-the-box and it is decided not to introduce any manual CMake-level workarounds for HIDAPI on this matter.
```suggestion CMake doesn't have such option of-the-box and it is decided not to introduce any manual CMake-level workarounds for HIDAPI on this matter. ```
Youw (Migrated from github.com) reviewed 2023-03-13 05:39:18 -05:00
@ -233,3 +233,48 @@ Advanced:
target_compile_definitions(hidapi_libusb PRIVATE NO_ICONV)
Youw (Migrated from github.com) commented 2023-03-13 05:39:17 -05:00
- Autotools/pkg-config (`.pc`) files will be generated and usable _as if_ generated by Autotools natively and build configured with both `-enable-static --enable-shared` options;
```suggestion - Autotools/pkg-config (`.pc`) files will be generated and usable _as if_ generated by Autotools natively and build configured with both `-enable-static --enable-shared` options; ```
Youw (Migrated from github.com) reviewed 2023-03-13 05:40:18 -05:00
@ -233,3 +233,48 @@ Advanced:
target_compile_definitions(hidapi_libusb PRIVATE NO_ICONV)
Youw (Migrated from github.com) commented 2023-03-13 05:40:17 -05:00
cmake -S <HIDAPI source dir> -B "<build dir>/shared" -DCMAKE_INSTALL_PREFIX=<your installation prefix> -DBUILD_SHARED_LIBS=TRUE
```suggestion cmake -S <HIDAPI source dir> -B "<build dir>/shared" -DCMAKE_INSTALL_PREFIX=<your installation prefix> -DBUILD_SHARED_LIBS=TRUE ```
Youw (Migrated from github.com) reviewed 2023-03-13 05:41:15 -05:00
@ -233,3 +233,48 @@ Advanced:
target_compile_definitions(hidapi_libusb PRIVATE NO_ICONV)
Youw (Migrated from github.com) commented 2023-03-13 05:41:15 -05:00
# NOTE: order of installation matters - install Shared variant *the last*
```suggestion # NOTE: order of installation matters - install Shared variant *the last* ```
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-libusb/hidapi!517
No description provided.