【发布时间】:2016-02-18 15:25:10
【问题描述】:
如何在windows7机器上编译安装qml-material?
首先我克隆和编译extra-cmake-modules,如下所示:
git clone git://anongit.kde.org/extra-cmake-modules
cd extra-cmake-modules
mkdir build
cd build
cmake -G "MinGW Makefiles" ..
之后我运行Make 命令但没有输出!(没有错误也没有变化!)
为了编译 qml-material,我使用以下指令:
mkdir build
cd build
cmake -G "MinGW Makefiles" ..
但我得到错误:
-- The C compiler identification is GNU 4.9.2
-- The CXX compiler identification is GNU 4.9.2
-- Check for working C compiler: C:/bin/cxx/Qt/Qt5.5.1/Tools/mingw492_32/bin/gcc.exe
-- Check for working C compiler: C:/bin/cxx/Qt/Qt5.5.1/Tools/mingw492_32/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/bin/cxx/Qt/Qt5.5.1/Tools/mingw492_32/bin/g++.exe
-- Check for working CXX compiler: C:/bin/cxx/Qt/Qt5.5.1/Tools/mingw492_32/bin/g++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at C:/Users/me/Documents/Github/ecm/ECMConfig.cmake:35 (include):
include could not find load file:
C:/Users/me/share/ECM/modules//ECMUseFindModules.cmake
Call Stack (most recent call first):
CMakeLists.txt:13 (find_package)
CMake Error at CMakeLists.txt:16 (include):
include could not find load file:
KDEInstallDirs
CMake Error at CMakeLists.txt:17 (include):
include could not find load file:
KDECMakeSettings
CMake Error at CMakeLists.txt:18 (include):
include could not find load file:
KDECompilerSettings
CMake Error at tests/CMakeLists.txt:1 (include):
include could not find load file:
ECMMarkAsTest
CMake Error at tests/CMakeLists.txt:13 (ecm_mark_as_test):
Unknown CMake command "ecm_mark_as_test".
-- Configuring incomplete, errors occurred!
我尝试使用 QtCreator 编译 ECM,然后 qml-material,ECM 编译和构建正常,没有任何错误,但 qml-material 也显示上述错误!!!
谢谢,
【问题讨论】:
-
好吧,你真的不需要“构建” qml-material。只需将纯 QML 目录结构从 github.com/papyros/qml-material/tree/develop/modules 复制到“Qt5.5.1/5.5/mingw/qml/Material”,从 github.com/papyros/qml-material/tree/develop/modules/QtQuick/… 复制到“Qt5.5.1/5.5/mingw/qml/QtQuick/Controls/Styles/Material”
-
@sk2212:感谢您的评论,您确实为我节省了数小时的麻烦!
-
@nwestbury 欢迎您!也许我应该提供评论作为答案;-)?