Hi,

I'm trying to use CMake for a Windows application that links against Qt 4. I've installed Qt 4.5.1 from sources (unzipped to the standard location C:\Qt\4.5.1) and compiled it myself.

As qmake is not in my PATH, I'm using

---8<---(snip)---

cmake_minimum_required(VERSION 2.6.4)

set(name "Qt Test")
project(${name})

file(GLOB_RECURSE sources "src/*.h" "src/*.cpp" "src/*.ui")
add_executable(${name} ${sources})

include(FindQt4)
find_package(Qt4 PATHS "C:/Qt")

---8<---(snip)---

to point CMake to the right directory. It seems to work, sort of, but I'm getting the following error:

---8<---(snip)---

  Could not find a configuration file for package Qt4.

Set Qt4_DIR to the directory containing a CMake configuration file for Qt4.
  The file will have one of the following names:

    Qt4Config.cmake
    qt4-config.cmake

---8<---(snip)---

Why is CMake searching for such a file? Where should that file be located? Do I need to create it?

--
Sebastian Schuberth

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to