Meson support #410

Merged
Youw merged 14 commits from meson_support into master 2022-09-10 08:52:46 -05:00
Youw commented 2022-05-04 09:23:13 -05:00 (Migrated from github.com)

As a wrapepr over CMake.
Still experimental support and definitely not a primary build system.

As a wrapepr over CMake. ~Still experimental support and definitely not a primary build system.~
z3ntu (Migrated from github.com) reviewed 2022-05-04 09:23:13 -05:00
neheb commented 2022-06-22 17:18:55 -05:00 (Migrated from github.com)

From IRC:

<> The hidapi PR is more cursed than any other possible use of the cmake module I ever did see
<> eye-wateringly bad
<> it also inherently doesn't work, it's a sandbox violation

I would add WrapDB support if possible. Something like

hidapi_dep = declare_dependency(
  include_directories : ???,
  link_with : hidapi,
)
From IRC: ``` <> The hidapi PR is more cursed than any other possible use of the cmake module I ever did see <> eye-wateringly bad <> it also inherently doesn't work, it's a sandbox violation ``` I would add WrapDB support if possible. Something like ``` hidapi_dep = declare_dependency( include_directories : ???, link_with : hidapi, ) ```
Youw commented 2022-06-22 18:07:35 -05:00 (Migrated from github.com)

it also inherently doesn't work

Samples please. I've tried standalone builds and a subproject dependencies - all compiles and runs just fine.

it's a sandbox violation

Please elaborate.

Something like

Ultimately you need to specify sources + compilation flags + link flags per-platform. And if those are going to change - meson will be another full-scale build system which needs to be supported/updated, and that's not something I'm looking forward to.


CMake is introduced for HIDAPI as a long-term replacement for autotools+MSVC build scripts, which (CMake) provides all the same functionality as autotools and a bit more (e.g. convenience for CMake users).

Having full-scale Meson build system for HIDAPI only for Meson users - not something I vote for.
Having Meson wraper over CMake for Meson users - something I'm willing to provide myself.

If that is ultimately not accepted by Meson users/community - someone needs to volunteer and support a separate build system. Possibly as it is done by cython-hidapi or node-hid - in a separate repository.

> it also inherently doesn't work Samples please. I've tried standalone builds and a subproject dependencies - all compiles and runs just fine. > it's a sandbox violation Please elaborate. > Something like Ultimately you need to specify sources + compilation flags + link flags _per-platform_. And if those are going to change - meson will be another full-scale build system which needs to be supported/updated, and that's not something I'm looking forward to. --- CMake is introduced for HIDAPI as a long-term replacement for autotools+MSVC build scripts, which (CMake) provides all the same functionality as autotools _and a bit more_ (e.g. convenience for CMake users). Having full-scale Meson build system for HIDAPI only for Meson users - not something I vote for. Having Meson wraper over CMake for Meson users - something I'm willing to provide myself. If that is ultimately not accepted by Meson users/community - someone needs to volunteer and support a separate build system. Possibly as it is done by [cython-hidapi](https://github.com/trezor/cython-hidapi) or [node-hid](https://github.com/node-hid/node-hid) - in a separate repository.
neheb commented 2022-06-22 20:15:53 -05:00 (Migrated from github.com)

The sandbox violation was before https://github.com/libusb/hidapi/pull/410/commits/ceb5e437bfbdc65bf91b6ab65555330be815943a . Now all files are copied.

The sandbox violation was before https://github.com/libusb/hidapi/pull/410/commits/ceb5e437bfbdc65bf91b6ab65555330be815943a . Now all files are copied.
Youw commented 2022-06-23 04:38:40 -05:00 (Migrated from github.com)

That I don't like either...
Maybe I can improve it someohow - need to check.

That I don't like either... Maybe I can improve it someohow - need to check.
neheb commented 2022-07-11 18:50:22 -05:00 (Migrated from github.com)

wrapdb now has a libusb wrap. might as well use it here.

wrapdb now has a libusb wrap. might as well use it here.
mcuee commented 2022-07-16 08:14:46 -05:00 (Migrated from github.com)

No idea about meson. But the branch does not seem to work.

mcuee@mcuees-Mac-mini hidapi_meson % git branch -a
  master
* meson_support
  remotes/origin/HEAD -> origin/master
  remotes/origin/connection-callback
  remotes/origin/get-descriptor
  remotes/origin/github_pages
  remotes/origin/hid_get_device_info
  remotes/origin/master
  remotes/origin/meson_support
  remotes/origin/windows_report_descriptor_reconstructor_unit_test

mcuee@mcuees-Mac-mini hidapi_meson % meson build_darwin && cd build_darwin
The Meson build system
Version: 0.63.0
Source dir: /Users/mcuee/build/hidapi/hidapi_test/hidapi_meson
Build dir: /Users/mcuee/build/hidapi/hidapi_test/hidapi_meson/build_darwin
Build type: native build
Project name: hidapi
Project version: 0.12.0
Host machine cpu family: aarch64
Host machine cpu: arm64

Executing subproject hidapi_build_cmake method cmake 

hidapi_build_cmake| Found CMake: /opt/homebrew/bin/cmake (3.23.2)

| Configuring the build directory with CMake version 3.23.2
| Running CMake with: -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local
|   - build directory:          /Users/mcuee/build/hidapi/hidapi_test/hidapi_meson/build_darwin/subprojects/hidapi_build_cmake/__CMake_build
|   - source directory:         /Users/mcuee/build/hidapi/hidapi_test/hidapi_meson/subprojects/hidapi_build_cmake
|   - toolchain file:           /Users/mcuee/build/hidapi/hidapi_test/hidapi_meson/build_darwin/subprojects/hidapi_build_cmake/__CMake_build/CMakeMesonToolchainFile.cmake
|   - preload file:             /opt/homebrew/Cellar/meson/0.63.0/libexec/lib/python3.10/site-packages/mesonbuild/cmake/data/preload.cmake
|   - trace args:               --trace-expand --trace-format=json-v1 --no-warn-unused-cli --trace-redirect=cmake_trace.txt
|   - disabled policy warnings: [CMP0025, CMP0047, CMP0056, CMP0060, CMP0065, CMP0066, CMP0067, CMP0082, CMP0089, CMP0102]

| CMake Warning (dev) in CMakeLists.txt:
| No project() command is present.  The top-level CMakeLists.txt file must
| contain a literal, direct call to the project() command.  Add a line of
| code such as

| project(ProjectName)

| near the top of the file, but after cmake_minimum_required().

| CMake is pretending there is a "project(Project)" command on the first
| line.
| This warning is for project developers.  Use -Wno-dev to suppress it.
| Running with expanded trace output on.
| Not searching for unused variables given on the command line.
| Trace will be written to cmake_trace.txt

| -- The C compiler identification is AppleClang 13.1.6.13160021
| -- The CXX compiler identification is AppleClang 13.1.6.13160021
| -- Detecting C compiler ABI info
| -- Detecting C compiler ABI info - done
| -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
| -- Detecting C compile features
| -- Detecting C compile features - done
| -- Detecting CXX compiler ABI info
| -- Detecting CXX compiler ABI info - done
| -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
| -- Detecting CXX compile features
| -- Detecting CXX compile features - done
| -- Looking for pthread.h
| -- Looking for pthread.h - found
| -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
| -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
| -- Found Threads: TRUE
| -- Configuring done
| -- Generating done
| -- Build files have been written to: /Users/mcuee/build/hidapi/hidapi_test/hidapi_meson/build_darwin/subprojects/hidapi_build_cmake/__CMake_build

hidapi_build_cmake| CMake configuration: SUCCEEDED
hidapi_build_cmake| CMake project Project has 2 build targets.

cmake-ast| Processing generated meson AST
cmake-ast| Build file: /Users/mcuee/build/hidapi/hidapi_test/hidapi_meson/build_darwin/subprojects/hidapi_build_cmake/meson.build

hidapi_build_cmake| Project name: Project
hidapi_build_cmake| Project version: undefined
hidapi_build_cmake| C compiler for the host machine: cc (clang 13.1.6 "Apple clang version 13.1.6 (clang-1316.0.21.2.5)")
hidapi_build_cmake| C linker for the host machine: cc ld64 764

subprojects/hidapi_build_cmake/meson.build:5:0: ERROR: Sandbox violation: Tried to grab file hid.c outside current (sub)project.

A full log can be found at /Users/mcuee/build/hidapi/hidapi_test/hidapi_meson/build_darwin/meson-logs/meson-log.txt

meson-log.txt

No idea about meson. But the branch does not seem to work. ``` mcuee@mcuees-Mac-mini hidapi_meson % git branch -a master * meson_support remotes/origin/HEAD -> origin/master remotes/origin/connection-callback remotes/origin/get-descriptor remotes/origin/github_pages remotes/origin/hid_get_device_info remotes/origin/master remotes/origin/meson_support remotes/origin/windows_report_descriptor_reconstructor_unit_test mcuee@mcuees-Mac-mini hidapi_meson % meson build_darwin && cd build_darwin The Meson build system Version: 0.63.0 Source dir: /Users/mcuee/build/hidapi/hidapi_test/hidapi_meson Build dir: /Users/mcuee/build/hidapi/hidapi_test/hidapi_meson/build_darwin Build type: native build Project name: hidapi Project version: 0.12.0 Host machine cpu family: aarch64 Host machine cpu: arm64 Executing subproject hidapi_build_cmake method cmake hidapi_build_cmake| Found CMake: /opt/homebrew/bin/cmake (3.23.2) | Configuring the build directory with CMake version 3.23.2 | Running CMake with: -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local | - build directory: /Users/mcuee/build/hidapi/hidapi_test/hidapi_meson/build_darwin/subprojects/hidapi_build_cmake/__CMake_build | - source directory: /Users/mcuee/build/hidapi/hidapi_test/hidapi_meson/subprojects/hidapi_build_cmake | - toolchain file: /Users/mcuee/build/hidapi/hidapi_test/hidapi_meson/build_darwin/subprojects/hidapi_build_cmake/__CMake_build/CMakeMesonToolchainFile.cmake | - preload file: /opt/homebrew/Cellar/meson/0.63.0/libexec/lib/python3.10/site-packages/mesonbuild/cmake/data/preload.cmake | - trace args: --trace-expand --trace-format=json-v1 --no-warn-unused-cli --trace-redirect=cmake_trace.txt | - disabled policy warnings: [CMP0025, CMP0047, CMP0056, CMP0060, CMP0065, CMP0066, CMP0067, CMP0082, CMP0089, CMP0102] | CMake Warning (dev) in CMakeLists.txt: | No project() command is present. The top-level CMakeLists.txt file must | contain a literal, direct call to the project() command. Add a line of | code such as | project(ProjectName) | near the top of the file, but after cmake_minimum_required(). | CMake is pretending there is a "project(Project)" command on the first | line. | This warning is for project developers. Use -Wno-dev to suppress it. | Running with expanded trace output on. | Not searching for unused variables given on the command line. | Trace will be written to cmake_trace.txt | -- The C compiler identification is AppleClang 13.1.6.13160021 | -- The CXX compiler identification is AppleClang 13.1.6.13160021 | -- Detecting C compiler ABI info | -- Detecting C compiler ABI info - done | -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped | -- Detecting C compile features | -- Detecting C compile features - done | -- Detecting CXX compiler ABI info | -- Detecting CXX compiler ABI info - done | -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped | -- Detecting CXX compile features | -- Detecting CXX compile features - done | -- Looking for pthread.h | -- Looking for pthread.h - found | -- Performing Test CMAKE_HAVE_LIBC_PTHREAD | -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success | -- Found Threads: TRUE | -- Configuring done | -- Generating done | -- Build files have been written to: /Users/mcuee/build/hidapi/hidapi_test/hidapi_meson/build_darwin/subprojects/hidapi_build_cmake/__CMake_build hidapi_build_cmake| CMake configuration: SUCCEEDED hidapi_build_cmake| CMake project Project has 2 build targets. cmake-ast| Processing generated meson AST cmake-ast| Build file: /Users/mcuee/build/hidapi/hidapi_test/hidapi_meson/build_darwin/subprojects/hidapi_build_cmake/meson.build hidapi_build_cmake| Project name: Project hidapi_build_cmake| Project version: undefined hidapi_build_cmake| C compiler for the host machine: cc (clang 13.1.6 "Apple clang version 13.1.6 (clang-1316.0.21.2.5)") hidapi_build_cmake| C linker for the host machine: cc ld64 764 subprojects/hidapi_build_cmake/meson.build:5:0: ERROR: Sandbox violation: Tried to grab file hid.c outside current (sub)project. A full log can be found at /Users/mcuee/build/hidapi/hidapi_test/hidapi_meson/build_darwin/meson-logs/meson-log.txt ``` [meson-log.txt](https://github.com/libusb/hidapi/files/9125816/meson-log.txt)
Youw commented 2022-07-16 08:20:52 -05:00 (Migrated from github.com)

Are you sure this is the latest commit of the branch?

Are you sure this is the latest commit of the branch?
Youw commented 2022-07-16 08:21:41 -05:00 (Migrated from github.com)

Maybe the build directory has to be outside of the sourse tree? E.g.: meson ../build_darwin && cd ../build_darwin

Maybe the build directory has to be outside of the sourse tree? E.g.: `meson ../build_darwin && cd ../build_darwin`
mcuee commented 2022-07-16 08:24:14 -05:00 (Migrated from github.com)

Maybe the build directory has to be outside of the sourse tree? E.g.: meson ../build_darwin && cd ../build_darwin

That is it. Thanks.

mcuee@mcuees-Mac-mini hidapi_meson % meson ../build_darwin && cd ../build_darwin
The Meson build system
Version: 0.63.0
Source dir: /Users/mcuee/build/hidapi/hidapi_test/hidapi_meson
Build dir: /Users/mcuee/build/hidapi/hidapi_test/build_darwin
Build type: native build
Project name: hidapi
Project version: 0.12.0
Host machine cpu family: aarch64
Host machine cpu: arm64

Executing subproject hidapi_build_cmake method cmake 

hidapi_build_cmake| Found CMake: /opt/homebrew/bin/cmake (3.23.2)

| Configuring the build directory with CMake version 3.23.2
| Running CMake with: -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local
|   - build directory:          /Users/mcuee/build/hidapi/hidapi_test/build_darwin/subprojects/hidapi_build_cmake/__CMake_build
|   - source directory:         /Users/mcuee/build/hidapi/hidapi_test/hidapi_meson/subprojects/hidapi_build_cmake
|   - toolchain file:           /Users/mcuee/build/hidapi/hidapi_test/build_darwin/subprojects/hidapi_build_cmake/__CMake_build/CMakeMesonToolchainFile.cmake
|   - preload file:             /opt/homebrew/Cellar/meson/0.63.0/libexec/lib/python3.10/site-packages/mesonbuild/cmake/data/preload.cmake
|   - trace args:               --trace-expand --trace-format=json-v1 --no-warn-unused-cli --trace-redirect=cmake_trace.txt
|   - disabled policy warnings: [CMP0025, CMP0047, CMP0056, CMP0060, CMP0065, CMP0066, CMP0067, CMP0082, CMP0089, CMP0102]

| CMake Warning (dev) in CMakeLists.txt:
| No project() command is present.  The top-level CMakeLists.txt file must
| contain a literal, direct call to the project() command.  Add a line of
| code such as

| project(ProjectName)

| near the top of the file, but after cmake_minimum_required().

| CMake is pretending there is a "project(Project)" command on the first
| line.
| This warning is for project developers.  Use -Wno-dev to suppress it.
| Running with expanded trace output on.
| Not searching for unused variables given on the command line.
| Trace will be written to cmake_trace.txt

| -- The C compiler identification is AppleClang 13.1.6.13160021
| -- The CXX compiler identification is AppleClang 13.1.6.13160021
| -- Detecting C compiler ABI info
| -- Detecting C compiler ABI info - done
| -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
| -- Detecting C compile features
| -- Detecting C compile features - done
| -- Detecting CXX compiler ABI info
| -- Detecting CXX compiler ABI info - done
| -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
| -- Detecting CXX compile features
| -- Detecting CXX compile features - done
| -- Looking for pthread.h
| -- Looking for pthread.h - found
| -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
| -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
| -- Found Threads: TRUE
| -- Configuring done
| -- Generating done
| -- Build files have been written to: /Users/mcuee/build/hidapi/hidapi_test/build_darwin/subprojects/hidapi_build_cmake/__CMake_build

hidapi_build_cmake| CMake configuration: SUCCEEDED
hidapi_build_cmake| CMake project Project has 2 build targets.

cmake-ast| Processing generated meson AST
cmake-ast| Build file: /Users/mcuee/build/hidapi/hidapi_test/build_darwin/subprojects/hidapi_build_cmake/meson.build

hidapi_build_cmake| Project name: Project
hidapi_build_cmake| Project version: undefined
hidapi_build_cmake| C compiler for the host machine: cc (clang 13.1.6 "Apple clang version 13.1.6 (clang-1316.0.21.2.5)")
hidapi_build_cmake| C linker for the host machine: cc ld64 764
hidapi_build_cmake| Build targets in project: 1
hidapi_build_cmake| Subproject hidapi_build_cmake finished.


Build targets in project: 1

hidapi 0.12.0

  Subprojects
    hidapi_build_cmake: YES

Found ninja-1.11.0 at /opt/homebrew/bin/ninja

mcuee@mcuees-Mac-mini build_darwin % meson compile
[2/2] Linking target subprojects/hidapi_build_cmake/libhidapi_darwin.dylib

mcuee@mcuees-Mac-mini build_darwin % meson test
No tests defined.
> Maybe the build directory has to be outside of the sourse tree? E.g.: `meson ../build_darwin && cd ../build_darwin` That is it. Thanks. ``` mcuee@mcuees-Mac-mini hidapi_meson % meson ../build_darwin && cd ../build_darwin The Meson build system Version: 0.63.0 Source dir: /Users/mcuee/build/hidapi/hidapi_test/hidapi_meson Build dir: /Users/mcuee/build/hidapi/hidapi_test/build_darwin Build type: native build Project name: hidapi Project version: 0.12.0 Host machine cpu family: aarch64 Host machine cpu: arm64 Executing subproject hidapi_build_cmake method cmake hidapi_build_cmake| Found CMake: /opt/homebrew/bin/cmake (3.23.2) | Configuring the build directory with CMake version 3.23.2 | Running CMake with: -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local | - build directory: /Users/mcuee/build/hidapi/hidapi_test/build_darwin/subprojects/hidapi_build_cmake/__CMake_build | - source directory: /Users/mcuee/build/hidapi/hidapi_test/hidapi_meson/subprojects/hidapi_build_cmake | - toolchain file: /Users/mcuee/build/hidapi/hidapi_test/build_darwin/subprojects/hidapi_build_cmake/__CMake_build/CMakeMesonToolchainFile.cmake | - preload file: /opt/homebrew/Cellar/meson/0.63.0/libexec/lib/python3.10/site-packages/mesonbuild/cmake/data/preload.cmake | - trace args: --trace-expand --trace-format=json-v1 --no-warn-unused-cli --trace-redirect=cmake_trace.txt | - disabled policy warnings: [CMP0025, CMP0047, CMP0056, CMP0060, CMP0065, CMP0066, CMP0067, CMP0082, CMP0089, CMP0102] | CMake Warning (dev) in CMakeLists.txt: | No project() command is present. The top-level CMakeLists.txt file must | contain a literal, direct call to the project() command. Add a line of | code such as | project(ProjectName) | near the top of the file, but after cmake_minimum_required(). | CMake is pretending there is a "project(Project)" command on the first | line. | This warning is for project developers. Use -Wno-dev to suppress it. | Running with expanded trace output on. | Not searching for unused variables given on the command line. | Trace will be written to cmake_trace.txt | -- The C compiler identification is AppleClang 13.1.6.13160021 | -- The CXX compiler identification is AppleClang 13.1.6.13160021 | -- Detecting C compiler ABI info | -- Detecting C compiler ABI info - done | -- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped | -- Detecting C compile features | -- Detecting C compile features - done | -- Detecting CXX compiler ABI info | -- Detecting CXX compiler ABI info - done | -- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped | -- Detecting CXX compile features | -- Detecting CXX compile features - done | -- Looking for pthread.h | -- Looking for pthread.h - found | -- Performing Test CMAKE_HAVE_LIBC_PTHREAD | -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success | -- Found Threads: TRUE | -- Configuring done | -- Generating done | -- Build files have been written to: /Users/mcuee/build/hidapi/hidapi_test/build_darwin/subprojects/hidapi_build_cmake/__CMake_build hidapi_build_cmake| CMake configuration: SUCCEEDED hidapi_build_cmake| CMake project Project has 2 build targets. cmake-ast| Processing generated meson AST cmake-ast| Build file: /Users/mcuee/build/hidapi/hidapi_test/build_darwin/subprojects/hidapi_build_cmake/meson.build hidapi_build_cmake| Project name: Project hidapi_build_cmake| Project version: undefined hidapi_build_cmake| C compiler for the host machine: cc (clang 13.1.6 "Apple clang version 13.1.6 (clang-1316.0.21.2.5)") hidapi_build_cmake| C linker for the host machine: cc ld64 764 hidapi_build_cmake| Build targets in project: 1 hidapi_build_cmake| Subproject hidapi_build_cmake finished. Build targets in project: 1 hidapi 0.12.0 Subprojects hidapi_build_cmake: YES Found ninja-1.11.0 at /opt/homebrew/bin/ninja mcuee@mcuees-Mac-mini build_darwin % meson compile [2/2] Linking target subprojects/hidapi_build_cmake/libhidapi_darwin.dylib mcuee@mcuees-Mac-mini build_darwin % meson test No tests defined. ```
mcuee commented 2022-07-16 08:27:37 -05:00 (Migrated from github.com)

@Youw
How to build hidtest using meson?

@Youw How to build hidtest using meson?
Youw commented 2022-07-16 09:11:59 -05:00 (Migrated from github.com)

There is no way right now.
Unless one writes a Mason build script for hidtest

There is no way right now. Unless one writes a Mason build script for hidtest
Youw (Migrated from github.com) reviewed 2022-07-16 09:13:07 -05:00
@ -0,0 +1,10 @@
cmake_minimum_required(VERSION 3.1.3 FATAL_ERROR)
Youw (Migrated from github.com) commented 2022-07-16 09:13:07 -05:00
cmake_minimum_required(VERSION 3.1.3 FATAL_ERROR)
project(hidapi LANGUAGES C)
```suggestion cmake_minimum_required(VERSION 3.1.3 FATAL_ERROR) project(hidapi LANGUAGES C) ```
mcuee commented 2022-07-16 09:29:24 -05:00 (Migrated from github.com)

There is no way right now. Unless one writes a Mason build script for hidtest

I see.

Test of latest version under MSYS2 mingw64.

MINGW64 /c/work/libusb/hidapi_test/hidapi_meson
$ git checkout meson_support
branch 'meson_support' set up to track 'origin/meson_support'.
Switched to a new branch 'meson_support'

$ meson ../build_mingw64 && cd ../build_mingw64
The Meson build system
Version: 0.62.1
Source dir: C:/work/libusb/hidapi_test/hidapi_meson
Build dir: C:/work/libusb/hidapi_test/build_mingw64
Build type: native build
Project name: hidapi
Project version: 0.12.0
Host machine cpu family: x86_64
Host machine cpu: x86_64

Executing subproject hidapi_build_cmake method cmake

hidapi_build_cmake| Found CMake: C:\msys64\mingw64\bin/cmake.EXE (3.23.1)

| Configuring the build directory with CMake version 3.23.1
| Running CMake with: -G Ninja -DCMAKE_INSTALL_PREFIX=C:/msys64/mingw64
|   - build directory:          C:/work/libusb/hidapi_test/build_mingw64/subprojects/hidapi_build_cmake/__CMake_build
|   - source directory:         C:/work/libusb/hidapi_test/hidapi_meson/subprojects/hidapi_build_cmake
|   - toolchain file:           C:/work/libusb/hidapi_test/build_mingw64/subprojects/hidapi_build_cmake/__CMake_build/CMakeMesonToolchainFile.cmake
|   - preload file:             C:/msys64/mingw64/lib/python3.9/site-packages/mesonbuild/cmake/data/preload.cmake
|   - trace args:               --trace-expand --trace-format=json-v1 --no-warn-unused-cli --trace-redirect=cmake_trace.txt
|   - disabled policy warnings: [CMP0025, CMP0047, CMP0056, CMP0060, CMP0065, CMP0066, CMP0067, CMP0082, CMP0089, CMP0102]

| Running with expanded trace output on.
| Not searching for unused variables given on the command line.
| Trace will be written to cmake_trace.txt
| -- The C compiler identification is GNU 11.3.0
| -- Detecting C compiler ABI info
| -- Detecting C compiler ABI info - done
| -- Check for working C compiler: C:/msys64/mingw64/bin/cc.exe - skipped
| -- Detecting C compile features
| -- Detecting C compile features - done
| -- Configuring done
| -- Generating done
| -- Build files have been written to: C:/work/libusb/hidapi_test/build_mingw64/subprojects/hidapi_build_cmake/__CMake_build

hidapi_build_cmake| CMake configuration: SUCCEEDED
hidapi_build_cmake| CMake project hidapi has 2 build targets.

cmake-ast| Processing generated meson AST
cmake-ast| Build file: C:/work/libusb/hidapi_test/build_mingw64/subprojects/hidapi_build_cmake/meson.build

hidapi_build_cmake| Project name: hidapi
hidapi_build_cmake| Project version: undefined
hidapi_build_cmake| C compiler for the host machine: cc (gcc 11.3.0 "cc (Rev1, Built by MSYS2 project) 11.3.0")
hidapi_build_cmake| C linker for the host machine: cc ld.bfd 2.38
hidapi_build_cmake| Build targets in project: 1
hidapi_build_cmake| Subproject hidapi_build_cmake finished.


Build targets in project: 1

hidapi 0.12.0

  Subprojects
    hidapi_build_cmake: YES

Found ninja-1.10.2 at C:\msys64\mingw64\bin/ninja.EXE

$ meson compile
[2/2] Linking target subprojects/hidapi_build_cmake/libhidapi_winapi.dll
> There is no way right now. Unless one writes a Mason build script for hidtest I see. Test of latest version under MSYS2 mingw64. ``` MINGW64 /c/work/libusb/hidapi_test/hidapi_meson $ git checkout meson_support branch 'meson_support' set up to track 'origin/meson_support'. Switched to a new branch 'meson_support' $ meson ../build_mingw64 && cd ../build_mingw64 The Meson build system Version: 0.62.1 Source dir: C:/work/libusb/hidapi_test/hidapi_meson Build dir: C:/work/libusb/hidapi_test/build_mingw64 Build type: native build Project name: hidapi Project version: 0.12.0 Host machine cpu family: x86_64 Host machine cpu: x86_64 Executing subproject hidapi_build_cmake method cmake hidapi_build_cmake| Found CMake: C:\msys64\mingw64\bin/cmake.EXE (3.23.1) | Configuring the build directory with CMake version 3.23.1 | Running CMake with: -G Ninja -DCMAKE_INSTALL_PREFIX=C:/msys64/mingw64 | - build directory: C:/work/libusb/hidapi_test/build_mingw64/subprojects/hidapi_build_cmake/__CMake_build | - source directory: C:/work/libusb/hidapi_test/hidapi_meson/subprojects/hidapi_build_cmake | - toolchain file: C:/work/libusb/hidapi_test/build_mingw64/subprojects/hidapi_build_cmake/__CMake_build/CMakeMesonToolchainFile.cmake | - preload file: C:/msys64/mingw64/lib/python3.9/site-packages/mesonbuild/cmake/data/preload.cmake | - trace args: --trace-expand --trace-format=json-v1 --no-warn-unused-cli --trace-redirect=cmake_trace.txt | - disabled policy warnings: [CMP0025, CMP0047, CMP0056, CMP0060, CMP0065, CMP0066, CMP0067, CMP0082, CMP0089, CMP0102] | Running with expanded trace output on. | Not searching for unused variables given on the command line. | Trace will be written to cmake_trace.txt | -- The C compiler identification is GNU 11.3.0 | -- Detecting C compiler ABI info | -- Detecting C compiler ABI info - done | -- Check for working C compiler: C:/msys64/mingw64/bin/cc.exe - skipped | -- Detecting C compile features | -- Detecting C compile features - done | -- Configuring done | -- Generating done | -- Build files have been written to: C:/work/libusb/hidapi_test/build_mingw64/subprojects/hidapi_build_cmake/__CMake_build hidapi_build_cmake| CMake configuration: SUCCEEDED hidapi_build_cmake| CMake project hidapi has 2 build targets. cmake-ast| Processing generated meson AST cmake-ast| Build file: C:/work/libusb/hidapi_test/build_mingw64/subprojects/hidapi_build_cmake/meson.build hidapi_build_cmake| Project name: hidapi hidapi_build_cmake| Project version: undefined hidapi_build_cmake| C compiler for the host machine: cc (gcc 11.3.0 "cc (Rev1, Built by MSYS2 project) 11.3.0") hidapi_build_cmake| C linker for the host machine: cc ld.bfd 2.38 hidapi_build_cmake| Build targets in project: 1 hidapi_build_cmake| Subproject hidapi_build_cmake finished. Build targets in project: 1 hidapi 0.12.0 Subprojects hidapi_build_cmake: YES Found ninja-1.10.2 at C:\msys64\mingw64\bin/ninja.EXE $ meson compile [2/2] Linking target subprojects/hidapi_build_cmake/libhidapi_winapi.dll
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!410
No description provided.