compiling - CMake Warning at /usr/lib/x86_64-linux-gnu/cmake/Qt5Core/Qt5CoreMacros.cmake:273 (find_package): - Ask Ubuntu


compile c++ program qt 5.7.0+cmake, error appeared: c

make warning @ /usr/lib/x86_64-linux-gnu/cmake/qt5core/qt5coremacros.cmake:273 (find_package):   not find package configuration file provided "qt5widget"   of following names:      qt5widgetconfig.cmake     qt5widget-config.cmake    add installation prefix of "qt5widget" cmake_prefix_path or set   "qt5widget_dir" directory containing 1 of above files.  if   "qt5widget" provides separate development package or sdk, sure has   been installed. call stack (most recent call first):   cmakelists.txt:23 (qt5_use_modules)   cmake error @ /usr/lib/x86_64-linux-gnu/cmake/qt5core/qt5coremacros.cmake:275 (message):   can not use "widget" module has not yet been found. call stack (most recent call first):   cmakelists.txt:23 (qt5_use_modules)   -- configuring incomplete, errors occurred! see "/home/allanna/code/opencv2_test/colortest/build/cmakefiles/cmakeoutput.log".  cmakelists.txt   cmake_minimum_required(version 3.0.0)  project(colortest)  set(cmake_prefix_path "/usr/lib/x86_64-linux-gnu/cmake/qt5") set(cmake_cxx_flags "${cmake_cxx_flags} -std=c++11 -02 -pthread -fpie") set(cmake_automoc on) set(cmake_include_current_dir on) aux_source_directory(. src_list)  file(glob srcs *.h *.hpp *.c *.cc *.cpp) add_executable(${project_name} ${srcs} ${src_list} ${ui_files} ${qrc_files})  find_package(opencv required) target_link_libraries(${project_name} ${opencv_libs})  find_package(qt5core) find_package(qt5widgets) find_package(qt5gui) find_package(qt5opengl) find_package(qt5xml)  qt5_use_modules(${project_name} core widget opengl gui xml)  qt5_wrap_ui(ui_files mainwindow.ui) qt5_add_resources(qrc_files colortest.src) 

i'm rather confused, searched on internet several solution, doesn't work me. why appears -1 beside question? anyway, please. thank u.

i misspelling 1 word widgets

qt5_use_modules(${project_name} core widget opengl gui xml)

should

qt5_use_modules(${project_name} core widgets opengl gui xml)


Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User

sql server - "Configuration file does not exist", Event ID 274 - Super User