fixed cmakelists

This commit is contained in:
Marcel Otte 2015-12-31 18:52:24 +01:00
parent 7a38a55172
commit 938006d498
3 changed files with 15 additions and 24 deletions

View File

@ -3,26 +3,17 @@ project(network_packet_composer)
set(CMAKE_CXX_FLAGS "--std=c++14 -g -Wall") set(CMAKE_CXX_FLAGS "--std=c++14 -g -Wall")
# Find includes in corresponding build directories # Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed. # Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOMOC ON)
# Find the QtWidgets library # Find the QtWidgets library
find_package(Qt5Core)
find_package(Qt5Widgets) find_package(Qt5Widgets)
find_package(Qt5Gui)
add_subdirectory(src) add_subdirectory(src)
add_executable(npc main.cpp) add_executable(npc main.cpp)
target_link_libraries(npc src) target_link_libraries(npc src)
target_link_libraries(npc Qt5::Widgets) qt5_use_modules(npc Widgets)
target_link_libraries(npc Qt5::Core)
target_link_libraries(npc Qt5::Gui)

View File

@ -1,4 +1,4 @@
#include "mainwindow.h" #include "src/mainwindow.h"
#include <QApplication> #include <QApplication>
int main(int argc, char *argv[]) int main(int argc, char *argv[])

View File

@ -17,4 +17,4 @@ set(SOURCES abstractguidededitormodel.cpp
) )
add_library(src ${HEADERS} ${SOURCES}) add_library(src ${HEADERS} ${SOURCES})
qt5_use_modules(src Widgets)