[CMake] Problems with combo CMake/MSVC2013/Qt5

Jakob van Bethlehem jsvanbethlehem at gmail.com
Wed Feb 25 07:27:06 EST 2015


Hello,

Thanks for the quick reply!

On Tue, Feb 24, 2015 at 7:54 PM, Stephen Kelly <steveire at gmail.com> wrote:

> Jakob van Bethlehem wrote:
>
> > Dear users,
>
> >   set(CMAKE_PREFIX_PATH "C:/Qt/Qt5.4.0/5.4/msvc2013_64_opengl/lib/cmake")
>
> Don't do this. Pass CMAKE_PREFIX_PATH as an argument to cmake.
>

Good point; currently I'm in kind of a proof-of-concept phase, but I'll
make this change asap


>
> > The CMakeLists.txt file in the subfolder looks like this:
> >
> >   CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0)
>
> This has effects you probably don't intend. I suggest removing it.
>
>  http://www.cmake.org/cmake/help/v3.1/manual/cmake-policies.7.html


Hm, that's new to me, especially because the examples-page does not mention
this. Alas, something learned today!


>
> > The problem: for some reason when compiling mymain.cpp I get:
> >   fatal error C1083: Cannot open include file: 'mylib_export.h': No such
> > file or directory
> >
> > I already checked that the build-folder is added as an include directory,
>
> The build folder of the top-level is added as an include directory. Your
> export.h file is in the subdirectory.
>
> No, the mylib_export.h is created in the top-level build folder, which, as
you mentioned, is added as an include directory as expected. It is
_included_ though from a subdirectory, but AFAIK that shouldn't make a
difference (not that I remember from my Linux experience at least)

Sincerely,
Jakob van Bethlehem
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20150225/5c558680/attachment.html>


More information about the CMake mailing list