Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake files for Qt5LinguistTools and other executables from qt-tools are not configured properly #2834

Closed
yosagi opened this issue Feb 19, 2018 · 4 comments

Comments

@yosagi
Copy link
Contributor

yosagi commented Feb 19, 2018

Some executables such as lrelease.exe in qt-tools are installed under "vcpkg\installed\x64-windows\tools\qt5-tools". However, multiple cmake files installed by qt-tools including Qt5LinguistToolsConfig.cmake, point the executable at the wrong directory

    set(imported_location "${_qt5_linguisttools_install_prefix}/tools/qt5/lrelease.exe")

The location should be .../tools/qt5-tools/lrelease.exe.

Minimal CMakeLists.txt for reproducing this problem:

Project(QL)
Find_package(Qt5 COMPONENTS LinguistTools)
QT5_CREATE_TRANSLATION(QM_files test.cc test.ts)

CMake Error from the CMakeLists.txt

CMake Error at C:/opt/vc141win64-vcpkg/vcpkg/installed/x64-windows/share/cmake/Qt5LinguistTools/Qt5LinguistToolsConfig.cmake:10 (message):
  The package "Qt5LinguistTools" references the file

     "C:/opt/vc141win64-vcpkg/vcpkg/installed/x64-windows/tools/qt5/lrelease.exe"

  but this file does not exist.  Possible reasons include:

  * The file was deleted, renamed, or moved to another location.

  * An install or uninstall procedure did not complete successfully.

  * The installation package was faulty and contained

     "C:/opt/vc141win64-vcpkg/vcpkg/installed/x64-windows/share/cmake/Qt5LinguistTools/Qt5LinguistToolsConfig.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  C:/opt/vc141win64-vcpkg/vcpkg/installed/x64-windows/share/cmake/Qt5LinguistTools/Qt5LinguistToolsConfig.cmake:26 (_qt5_LinguistTools_check_file_exists)
  C:/opt/vc141win64-vcpkg/vcpkg/installed/x64-windows/share/cmake/Qt5/Qt5Config.cmake:28 (find_package)
  CMakeLists.txt:2 (Find_package)

I think qt5-scxml package also affected by this problem.

@yosagi
Copy link
Contributor Author

yosagi commented Feb 19, 2018

Modifying such paths by fixcmake.py in qt5-modularscripts could avoid this problem.

Possible solution:
yosagi@6e2a34c

@cmpute
Copy link
Contributor

cmpute commented Feb 19, 2018

A pull request is welcomed! 😄

@ras0219-msft
Copy link
Contributor

PR gratefully accepted :)

@longhuan2018
Copy link
Contributor

Fixcmake.py Modify the tools/qt5 in the cmake file of the qt tool to the tools/${port} directory, but it only considers the file suffix of windows. Add the suffix of linux and osx to the regular expression to fix the issue. #8029

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

No branches or pull requests

4 participants