2010-02-18 3 views
1

QtCreator에서 cmake 프로젝트를 빌드하려고합니다. -DQT_QMAKE_EXECUTABLE = D : /Qt/4.6.2/bin/qmake.exeQtCreator 1.3, Qt 4.6.2 및 windows에서 cmake 빌드 문제가 발생했습니다.

빌드 단계는이 오류와 함께 중단

: 나는 프로젝트를 열 때 나는 그렇지 Qt는 감지되지 않습니다 cmake에 대한 인수를 줄 필요가

Running build steps for project CollidingMice... 
Starting: D:/Qt/2010.02/bin/jom.exe 
"C:\Programmi\CMake 2.8\bin\cmake.exe" -HC:\devel\SRC\collidingmice_cmake -BC:\devel\SRC\collidingmice_cmake\qtcreator-build --check-build-system CMakeFiles\Makefile.cmake 0 
"C:\Programmi\CMake 2.8\bin\cmake.exe" -E cmake_progress_start C:\devel\SRC\collidingmice_cmake\qtcreator-build\CMakeFiles C:\devel\SRC\collidingmice_cmake\qtcreator-build\CMakeFiles\progress.marks 
D:\Qt\2010.02\bin\jom.exe -f CMakeFiles\Makefile2 /nologo - all 
D:\Qt\2010.02\bin\jom.exe -f CMakeFiles\collidingmice.dir\build.make /nologo -L CMakeFiles\collidingmice.dir\depend 
"C:\Programmi\CMake 2.8\bin\cmake.exe" -E cmake_progress_report C:\devel\SRC\collidingmice_cmake\qtcreator-build\CMakeFiles 4 
[ 25] Generating qrc_mice.cxx 
d:\Qt\4.6.2\bin\rcc.exe -name mice -o C:/devel/SRC/collidingmice_cmake/qtcreator-build/qrc_mice.cxx C:/devel/SRC/collidingmice_cmake/mice.qrc 
"C:\Programmi\CMake 2.8\bin\cmake.exe" -E cmake_depends "NMake Makefiles" C:\devel\SRC\collidingmice_cmake C:\devel\SRC\collidingmice_cmake C:\devel\SRC\collidingmice_cmake\qtcreator-build C:\devel\SRC\collidingmice_cmake\qtcreator-build C:\devel\SRC\collidingmice_cmake\qtcreator-build\CMakeFiles\collidingmice.dir\DependInfo.cmake --color= 
Scanning dependencies of target collidingmice 
D:\Qt\2010.02\bin\jom.exe -f CMakeFiles\collidingmice.dir\build.make /nologo -L CMakeFiles\collidingmice.dir\build 
"C:\Programmi\CMake 2.8\bin\cmake.exe" -E cmake_progress_report C:\devel\SRC\collidingmice_cmake\qtcreator-build\CMakeFiles 1 
[ 50] Building CXX object CMakeFiles/collidingmice.dir/main.cpp.obj 
C:\PROGRA~1\MICROS~1.0\VC\bin\cl.exe  @C:\DOCUME~1\NICOLA~1\IMPOST~1\Temp\main.cpp.obj.461273.jom 
jom 0.8.3 - empower your cores 

command failed with exit code 2 
command failed with exit code 2 
command failed with exit code 2 
command failed with exit code 2 
Exited with code 2. 
Error while building project CollidingMice 
When executing build step 'Make' 

내가 작성하려고하는 프로젝트는 collingmice qt 예제이며 qt 프롬프트에서 빌드됩니다. 여기에는 CMakeLists가 있습니다 :

CMAKE_MINIMUM_REQUIRED(VERSION 2.8) 
PROJECT(CollidingMice) 


################################################# QT4 Handling 
FIND_PACKAGE(Qt4 REQUIRED) 

#this include set all the qt variable need to compile qt 
INCLUDE(${QT_USE_FILE}) 

#Put here all headers files that need moc 
SET(Qt4_SRC 
) 

#Put here .ui form files 
SET(Qt4_UI 
) 

#Put here .qrc resource files 
SET(Qt4_RES mice.qrc 
) 

#Cmake macro 
QT4_WRAP_CPP(MOC_CPP ${Qt4_SRC}) 
QT4_WRAP_UI(UI_CPP ${Qt4_UI}) 
QT4_ADD_RESOURCES(RES_H ${Qt4_RES}) 

################################################# CPack 
INCLUDE(InstallRequiredSystemLibraries) 

SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "My funky project") 
SET(CPACK_PACKAGE_VENDOR "Me, myself, and I") 
#SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/ReadMe.txt") 
#SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt") 
SET(CPACK_PACKAGE_VERSION_MAJOR "1") 
SET(CPACK_PACKAGE_VERSION_MINOR "3") 
SET(CPACK_PACKAGE_VERSION_PATCH "2") 
SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") 
IF(WIN32 AND NOT UNIX) 
    # There is a bug in NSI that does not handle full unix paths properly. Make 
    # sure there is at least one set of four (4) backlasshes. 
    SET(CPACK_PACKAGE_ICON "${CMake_SOURCE_DIR}/Utilities/Release\\\\InstallIcon.bmp") 
    SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\MyExecutable.exe") 
    SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} My Famous Project") 
    SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\www.my-project-home-page.org") 
    SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.my-personal-home-page.com") 
    SET(CPACK_NSIS_CONTACT "[email protected]") 
    SET(CPACK_NSIS_MODIFY_PATH ON) 
ELSE(WIN32 AND NOT UNIX) 
    SET(CPACK_STRIP_FILES "bin/MyExecutable") 
    SET(CPACK_SOURCE_STRIP_FILES "") 
ENDIF(WIN32 AND NOT UNIX) 
SET(CPACK_PACKAGE_EXECUTABLES "MyExecutable" "My Executable") 

INCLUDE(CPack) 

################################################# General 
SET(CMAKE_BUILD_TYPE Release) 

SET(CMAKE_CXX_FLAGS "-Wall") 

INCLUDE_DIRECTORIES(.) 

SET(SRC 
    main.cpp 
    mouse.cpp 
    ${MOC_CPP} 
    ${UI_CPP} 
    ${RES_H} 
) 

SET(LIB 
    ${QT_LIBRARIES} 
) 

ADD_EXECUTABLE(collidingmice ${SRC}) 
TARGET_LINK_LIBRARIES(collidingmice ${LIB}) 

답변

1

오류가 무엇인지 Jom 출력에서 ​​분명하지 않습니다.

Qt Creator (2.0)의 최신 버전을 실행하고 Qt bin/디렉토리를 PATH에 추가하십시오.

관련 문제