[Development] OSX CMake broken in 5.1.1

Nils Jeisecke njeisecke at saltation.de
Thu Jul 25 19:47:10 CEST 2013


Hi!

Sorry for my previous mail, I hit the send button too early :-(

On Sun, Jun 16, 2013 at 11:35 AM, Stephen Kelly <stephen.kelly at kdab.com> wrote:
> On Friday, June 07, 2013 14:18:49 Daiwei Li wrote:
>> I recently my version of Qt to 5.1.1 and it seems to have broken CMake on
>> OSX. I get the following error message:
>
> The workaround for this issue has been merged to the qtbase stable branch.
> Feel free to update to that and re-test.

I still have this problem. qtbase is at
cb6fec851507e9e2a53e8b4b7d70e7e4ac165348.

This is my (out of source) configure line.

../../qt5/onfigure -opensource -nomake tests
make
make install

This gives me a framework installation in /usr/local/Qt-5.1.1

My CMakeLists.txt
---
cmake_minimum_required(VERSION 2.8.11)

project(testproject)

# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)

# Find the QtWidgets library
find_package(Qt5Widgets)

# Tell CMake to create the helloworld executable
add_executable(helloworld WIN32 main.cpp)

# Use the Widgets module from Qt 5.
target_link_libraries(helloworld Qt5::Widgets)
---

Now a minimal testcase produces the following result:

---
cmake -DCMAKE_PREFIX_PATH=/usr/local/Qt-5.1.1 ..

CMake Error at /usr/local/Qt-5.1.1/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:15
(message):
  The imported target "Qt5::Widgets" references the file

     "/usr/local/Qt-5.1.1/include/QtWidgets"

  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

     "/usr/local/Qt-5.1.1/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake"

  but not all the files it references.

Call Stack (most recent call first):
  /usr/local/Qt-5.1.1/lib/cmake/Qt5Widgets/Qt5WidgetsConfig.cmake:50
(_qt5_Widgets_check_file_exists)
  CMakeLists.txt:11 (find_package)
---

What's wrong with my setup?

Nils



More information about the Development mailing list