From e5ef9789b8f51e35d4b0c256f7d92f24288c2f79 Mon Sep 17 00:00:00 2001 From: Niakr1s Date: Sat, 23 Nov 2019 23:07:07 +0300 Subject: [PATCH] added icon to final exe! added flag to gtest --- CMakeLists.txt | 7 +++++-- src/gui/CMakeLists.txt | 1 + src/gui/mainwindow.cpp | 2 +- src/gui/resources/resources.qrc | 1 + src/gui/resources/rrt.ico | Bin 0 -> 4286 bytes 5 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 src/gui/resources/rrt.ico diff --git a/CMakeLists.txt b/CMakeLists.txt index 742fdc6..5cd0a54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.5) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_FLAGS "-mwindows") project(rrt LANGUAGES CXX VERSION 0.1.0) @@ -11,8 +12,7 @@ set (CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") -set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/a") - +set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/a") configure_file(src/version.h.in ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/version.h) @@ -36,4 +36,7 @@ add_subdirectory(libs/libdxfrw) add_subdirectory(libs/sqlite) add_subdirectory(src) + +if (ENABLE_TESTS) add_subdirectory(tests) +endif() diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index bfbe6ec..a6d3281 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -47,6 +47,7 @@ endif() add_executable(rrt ${SRC} ${QM_FILES} + resources/rrt.o ) target_link_libraries(rrt diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 38c57be..56a3e6e 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -17,7 +17,7 @@ MainWindow::MainWindow(QWidget* parent) : QMainWindow(parent) { auto updater = new Updater(); updater->startUpdateQuery(); - setWindowIcon(QIcon(":/icons/rrt.png")); + setWindowIcon(QIcon(":/icons/rrt.ico")); setWindowTitle("Rosreestr Tools"); mainWidget_ = new MainWidget(); diff --git a/src/gui/resources/resources.qrc b/src/gui/resources/resources.qrc index ba11997..868f3a6 100644 --- a/src/gui/resources/resources.qrc +++ b/src/gui/resources/resources.qrc @@ -12,5 +12,6 @@ newline.png semicolon.png database.svg + rrt.ico diff --git a/src/gui/resources/rrt.ico b/src/gui/resources/rrt.ico new file mode 100644 index 0000000000000000000000000000000000000000..5eb6c3c3666cb15447b9f7997ef70d60083590cd GIT binary patch literal 4286 zcmeHL&&z2+7#=MASm-XeO5~Jh}wy^>$w2>DJ3`5`wMB0uFu z@y|Y;PDg*c-P(`GD)QBAI`hUULC)Xw{33~JW=qqg>}j@Pw1Yju9b1E@gz0pO>-8#d+UGc(^NKe8ZKYCyymzpc%jE=LyWJLeBoYyL zzuy(`Ym@e{gQD z9}b7bTt4>IJM~X2787||tyZ|*ZfrIi6pKZHo6TlOl7z`*f^xacaF54>!{P8!4CC>b zaZ&%}^Lf!P6bhoB&1PXR7}#?#7!)}7>~6PH90SeM>-ECvbYi>RB9qC$;c#F$9K!GS z!)~`@u~?wlY{F))0x2i|!G;^)wJ`Q-02u$pz?dDHXvXa5VRh5rHQGl#7J literal 0 HcmV?d00001