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")
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
# Find the QtWidgets library
find_package(Qt5Core)
find_package(Qt5Widgets)
find_package(Qt5Gui)
add_subdirectory(src)
add_executable(npc main.cpp)
target_link_libraries(npc src)
target_link_libraries(npc Qt5::Widgets)
target_link_libraries(npc Qt5::Core)
target_link_libraries(npc Qt5::Gui)
qt5_use_modules(npc Widgets)

View File

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

View File

@ -1,20 +1,20 @@
set(HEADERS abstractguidededitormodel.h
flowlayout.h
guidededitorelement.h
guidededitorelementview.h
guidededitorlayer.h
guidededitorview.h
set(HEADERS abstractguidededitormodel.h
flowlayout.h
guidededitorelement.h
guidededitorelementview.h
guidededitorlayer.h
guidededitorview.h
mainwindow.h
)
set(SOURCES abstractguidededitormodel.cpp
flowlayout.cpp
guidededitorelement.cpp
guidededitorelementview.cpp
guidededitorlayer.cpp
guidededitorview.cpp
set(SOURCES abstractguidededitormodel.cpp
flowlayout.cpp
guidededitorelement.cpp
guidededitorelementview.cpp
guidededitorlayer.cpp
guidededitorview.cpp
mainwindow.cpp
)
add_library(src ${HEADERS} ${SOURCES})
qt5_use_modules(src Widgets)