cmake_minimum_required(VERSION 2.8.11) project(keyhole_finder_gui) # Find includes in corresponding build directories set(CMAKE_INCLUDE_CURRENT_DIR ON) # Instruct CMake to run moc automatically when needed. set(CMAKE_AUTOMOC ON) link_directories(~/mxe/usr/x86_64-w64-mingw32.static/lib) include_directories() # Find the QtWidgets library find_package( Qt5 COMPONENTS Core Gui Quick Widgets ) find_package( Threads ) set(qt_hallo_SRC src/main.cpp ) qt5_add_resources(qt_hallo_SRC src/resources.qrc) # Tell CMake to create the helloworld executable add_executable(qt_hallo ${qt_hallo_SRC}) # Use the Widgets module from Qt 5. target_link_libraries(qt_hallo Qt5::Quick Qt5::Widgets ${CMAKE_THREAD_LIBS_INIT} crypt32) # Install the executable install(TARGETS qt_hallo DESTINATION bin)