I am trying to compile my Qt program with cmake, but I have an arrangement when compiling qzip.cpp :
qzip.cpp: 57: 27: error fatal: qplatformdefs.h: There is no such file or directory
I added these lines to CMakeLists.txt, but this did not work:
IF (QT_LIBRARY_DIR AND NOT QT_MKSPECS_DIR OR QT_QMAKE_CHANGED)
EXEC_PROGRAM ($ {QT_QMAKE_EXECUTABLE}
ARGS "-query QMAKE_MKSPECS" OUTPUT_VARIABLE qt_mkspecs_dirs )
# do not replace: on windows, as it may be a drive letter
# and windows should already use; as a delimiter
IF (UNIX)
STRING(REPLACE ":" ";" qt_mkspecs_dirs "${qt_mkspecs_dirs}")
ENDIF (UNIX)
SET (QT_MKSPECS_DIR NOTFOUND)
FIND_PATH (QT_MKSPECS_DIR qconfig.pri PATHS $ {qt_mkspecs_dirs}
DOC "The location of the Qt mkspecs containing qconfig.pri" NO_DEFAULT_PATH )
ENDIF (QT_LIBRARY_DIR AND NOT QT_MKSPECS_DIR OR QT_QMAKE_CHANGED)
SET (QT_INCLUDES $ {QT_QT_INCLUDE_DIR} $ {QT_MKSPECS_DIR} / default $ {QT_INCLUDE_DIR})
So, how can I add a link to qplatformdefs.h in my CMakeLists.cpp?
Thank you very much.
PS: I'm on Ubuntu 12.04 32bits
source share