Skip to content

Fix configure error regarding find_package which cannot find qmsetup#240

Open
fragoulin wants to merge 1 commit into
stdware:mainfrom
fragoulin:main
Open

Fix configure error regarding find_package which cannot find qmsetup#240
fragoulin wants to merge 1 commit into
stdware:mainfrom
fragoulin:main

Conversation

@fragoulin

Copy link
Copy Markdown

When using a mxe toolchain, the following error appears:

CMake Error at build/win64/_deps/windowkit-src/CMakeLists.txt:133 (find_package):
  Could not find a package configuration file provided by "qmsetup" with any
  of the following names:

    qmsetupConfig.cmake
    qmsetup-config.cmake

  Add the installation prefix of "qmsetup" to CMAKE_PREFIX_PATH or set
  "qmsetup_DIR" to a directory containing one of the above files.  If
  "qmsetup" provides a separate development package or SDK, be sure it has
  been installed.

This fix simply sets the qmsetup_DIR variable before the call to find_package.

Related to #195

@wangwenx190
wangwenx190 requested a review from SineStriker July 25, 2026 03:18
@wangwenx190

Copy link
Copy Markdown
Collaborator

Thanks for your contribution! Sorry for the long delay due to we are quite busy recently.

@wangwenx190

Copy link
Copy Markdown
Collaborator

The issue is strange, can you provide a minimal reproduce example? How do you trigger this issue?

@fragoulin

fragoulin commented Jul 25, 2026

Copy link
Copy Markdown
Author

Sorry for the lack of information.
This issue occurs with a MXE toolchain. I use it for easily cross-compiling my QT projects using the cmake integration.

You first have to install MXE and build required QT6 packages for x86_64-w64-mingw32.static target:

  1. Install MXE requirements
  2. Install MXE
    git clone https://github.com/mxe/mxe.git
  3. Build QT6 for x86_64-w64-mingw32.static target
cd mxe
make qt6-qtbase qt6-qtdeclarative -j 8 MXE_TARGETS='x86_64-w64-mingw32.static'
  1. Update path to MXE usr/bin directory
    export PATH=/where MXE is installed/usr/bin:$PATH

Then compile qwindowkit using cmake integration from MXE for x86_64-w64-mingw32.static target:

cd qwindowkit
x86_64-w64-mingw32.static-cmake -S . -B build_x86_64-w64-mingw32.static \
  -DCMAKE_PREFIX_PATH=<where-MXE-is-installed>/usr/x86_64-w64-mingw32.static/qt6 \
  -DCMAKE_INSTALL_PREFIX=/opt/qwindowkit_x86_64-w64-mingw32.static \
  -DQWINDOWKIT_BUILD_WIDGETS=ON \
  -DQWINDOWKIT_BUILD_QUICK=ON \
  -DWIN32=1

The error message appears during installation of qmsetup :

...
-- Installing qmsetup (Release)...
CMake Error at CMakeLists.txt:128 (find_package):
  Could not find a package configuration file provided by "qmsetup" with any
  of the following names:

    qmsetupConfig.cmake
    qmsetup-config.cmake

  Add the installation prefix of "qmsetup" to CMAKE_PREFIX_PATH or set
  "qmsetup_DIR" to a directory containing one of the above files.  If
  "qmsetup" provides a separate development package or SDK, be sure it has
  been installed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants