fixed cmakelists
This commit is contained in:
parent
7a38a55172
commit
938006d498
|
@ -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)
|
|
||||||
|
|
||||||
|
|
2
main.cpp
2
main.cpp
|
@ -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[])
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
set(HEADERS abstractguidededitormodel.h
|
set(HEADERS abstractguidededitormodel.h
|
||||||
flowlayout.h
|
flowlayout.h
|
||||||
guidededitorelement.h
|
guidededitorelement.h
|
||||||
guidededitorelementview.h
|
guidededitorelementview.h
|
||||||
guidededitorlayer.h
|
guidededitorlayer.h
|
||||||
guidededitorview.h
|
guidededitorview.h
|
||||||
mainwindow.h
|
mainwindow.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(SOURCES abstractguidededitormodel.cpp
|
set(SOURCES abstractguidededitormodel.cpp
|
||||||
flowlayout.cpp
|
flowlayout.cpp
|
||||||
guidededitorelement.cpp
|
guidededitorelement.cpp
|
||||||
guidededitorelementview.cpp
|
guidededitorelementview.cpp
|
||||||
guidededitorlayer.cpp
|
guidededitorlayer.cpp
|
||||||
guidededitorview.cpp
|
guidededitorview.cpp
|
||||||
mainwindow.cpp
|
mainwindow.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
add_library(src ${HEADERS} ${SOURCES})
|
add_library(src ${HEADERS} ${SOURCES})
|
||||||
|
qt5_use_modules(src Widgets)
|
||||||
|
|
Reference in New Issue