Hi, 

> find_package(Qt5Core ${QT_MIN_VERSION} REQUIRED)

> I build with -DCMAKE_PREFIX_PATH set, and in CMakeCache.txt, I see:

> //No help, variable specified on the command line.
> CMAKE_PREFIX_PATH:PATH=/usr/pkg/qt5

> //The directory containing a CMake configuration file for Qt5Core.
> Qt5Core_DIR:PATH=Qt5Core_DIR-NOTFOUND

> # ls /usr/pkg/qt5/lib/cmake/Qt5Core/Qt5CoreConfig.cmake
> /usr/pkg/qt5/lib/cmake/Qt5Core/Qt5CoreConfig.cmake

> so AFAICT, Qt5CoreConfig.cmake should be found.

> What am I missing?

according to the documentation: 
https://cmake.org/cmake/help/v3.0/command/find_package.html
you're using the find_package() in MODULE mode, so it tries to locate a 
FindQt5Core.cmake.

Use this:
find_package(Qt5Core ${QT_MIN_VERSION} REQUIRED CONFIG)

and it should do what you want.

--
GrĂ¼sse,
Jakub
-- 

Powered by www.kitware.com

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

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

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

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

Reply via email to