问题
I am having a frustrating problem with cmake on windows. i have the kde libs installed.
when i am trying to compile my project with cmake . this shoots up again and again.
Found Qt-Version 4.7.0 (using C:/Qt/2010.05/qt/bin/qmake.exe)
CMake Error at c:/Program Files/KDE/share/apps/cmake/modules/FindPackageHandleStandardArgs.cmake:198 (MESSAGE):
Did not find automoc4 (Automoc4Config.cmake, part of kdesupport).
(missing: AUTOMOC4_EXECUTABLE)
Call Stack (most recent call first):
c:/Program Files/KDE/share/apps/cmake/modules/FindAutomoc4.cmake:56 (find_package_handle_standard_args)
c:/Program Files/KDE/share/apps/cmake/modules/FindKDE4Internal.cmake:402 (find_package)
C:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindKDE4.cmake:95 (FIND_PACKAGE)
CMakeLists.txt:96 (find_package)
Configuring incomplete, errors occurred!
Well i was digging around the net for this problem. and i got the automoc4 file which were missing with the default kde-win-installer. So i downloaded the files and ran cmake for the automoc4 and got the automoc4.exe which i place in the %KDE_INSTALL%/bin folder. But luck was not with me. And again my favorite error fires up.
Help me on this!!
回答1:
Problem solved thanks to patrick and the kde-windows team
download the following files from this url
then open cmake-gui select the browse source to the downloaded folder, and build source to some folder.
generate the cmake , open cmd and navigate to the build folder and type mingw-make.
U then get the automoc4.exe. 1. place it in the %KDE_INSTALL%\bin. 2. Then place Automoc4Config.cmake,Automoc4.files.in and Automoc4Version.cmake in %KDE_INSTALL%\lib\automoc4.
Now just try now.
回答2:
From what I can see, it seems that CMake is unable to find automoc4.
For CMake to find the excecutable, add the %KDE_INSTALL%/bin folder to the PATH environment variable. There might be a better way to fix this though.
Maybe you should take a look at Automoc4Confid.cmake to see where it looks for the thing. You should find that in the modules folder under the CMake folder
来源:https://stackoverflow.com/questions/5374019/very-frustrating-problem-with-cmake