# HG changeset patch # User František Kučera # Date 1537790626 -7200 # Node ID 0d857519a4c9fb2bc18c2a7bb1e4efc871f9306c # Parent 7ba3ae8cf1fc8b5e0033fab54b0a99e519484107 add Qt libraries using cmake diff -r 7ba3ae8cf1fc -r 0d857519a4c9 nbproject/configurations.xml --- a/nbproject/configurations.xml Mon Sep 24 13:59:06 2018 +0200 +++ b/nbproject/configurations.xml Mon Sep 24 14:03:46 2018 +0200 @@ -40,11 +40,24 @@ --> + + /usr/share/cmake-3.10/Modules/CMakeCXXCompilerABI.cpp + /usr/share/cmake-3.10/Modules/CMakeCompilerABI.h + relpipe-out-chart.cpp + + build/Debug/src/relpipe-out-chart_autogen/mocs_compilation.cpp + false - + @@ -79,10 +92,22 @@ build/Debug/src/relpipe-out-chart + build/Debug/src + src + build/Debug/src/relpipe-out-chart_autogen/include ../relpipe-lib-reader.cpp/include ../relpipe-lib-cli.cpp/include - build/Debug/src + /usr/include/x86_64-linux-gnu/qt5 + /usr/include/x86_64-linux-gnu/qt5/QtWidgets + /usr/include/x86_64-linux-gnu/qt5/QtGui + /usr/include/x86_64-linux-gnu/qt5/QtCore + /usr/lib/x86_64-linux-gnu/qt5/mkspecs/linux-g++ + + QT_CORE_LIB + QT_GUI_LIB + QT_WIDGETS_LIB + @@ -91,7 +116,26 @@ true - + + + + + + + + + + /usr/include + + + + diff -r 7ba3ae8cf1fc -r 0d857519a4c9 nbproject/project.xml --- a/nbproject/project.xml Mon Sep 24 13:59:06 2018 +0200 +++ b/nbproject/project.xml Mon Sep 24 14:03:46 2018 +0200 @@ -45,7 +45,7 @@ relpipe-out-chart.qt.cpp cpp - + h UTF-8 . diff -r 7ba3ae8cf1fc -r 0d857519a4c9 src/CMakeLists.txt --- a/src/CMakeLists.txt Mon Sep 24 13:59:06 2018 +0200 +++ b/src/CMakeLists.txt Mon Sep 24 14:03:46 2018 +0200 @@ -1,5 +1,11 @@ set(EXECUTABLE_FILE "relpipe-out-chart") +# Qt: +set(CMAKE_INCLUDE_CURRENT_DIR ON) # Find includes in corresponding build directories +set(CMAKE_AUTOMOC ON) # Instruct CMake to run moc automatically when needed +set(CMAKE_AUTOUIC ON) # Create code from a list of Qt designer ui files +find_package(Qt5Widgets CONFIG REQUIRED) # Find the QtWidgets library + # Add ASan AddressSanitizer set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address") set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address") @@ -13,3 +19,4 @@ add_executable (${EXECUTABLE_FILE} relpipe-out-chart.cpp) target_link_libraries(${EXECUTABLE_FILE} ${RELPIPE_LIB_READER_LIBRARIES}) +target_link_libraries(${EXECUTABLE_FILE} Qt5::Widgets) diff -r 7ba3ae8cf1fc -r 0d857519a4c9 src/relpipe-out-chart.cpp --- a/src/relpipe-out-chart.cpp Mon Sep 24 13:59:06 2018 +0200 +++ b/src/relpipe-out-chart.cpp Mon Sep 24 14:03:46 2018 +0200 @@ -1,5 +1,7 @@ #include +#include + #include #include #include @@ -12,6 +14,8 @@ int main(int argc, char**argv) { CLI cli(argc, argv); + QApplication app(argc, argv); + std::cout << "TODO: relpipe-out-chart..." << std::endl; std::shared_ptr reader(Factory::create(std::cin));