From 939181410a4c865e8652c5715fe570eb8a192014 Mon Sep 17 00:00:00 2001 From: Haoshen Zhong <124694738@qq.com> Date: Fri, 1 May 2020 08:47:11 +0800 Subject: [PATCH] cmake: fix a bug --- CMakeLists.txt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f505aa8..0958b75 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,11 @@ endif() find_package(Qt5 COMPONENTS Widgets REQUIRED) -add_executable(notepanda +if(WIN32) + set(GUI_TYPE WIN32) +endif() + +set(SOURCES src/main.cpp src/ui/mainwindow.cpp src/ui/mainwindow.h @@ -22,9 +26,13 @@ add_executable(notepanda src/core/texteditor.cpp src/core/texteditor.h notepanda.rc + resources.qrc ) -file(GLOB_RECURSE IMAGES images/remixicons/*.svg images/*.ico) +add_executable(notepanda + ${GUI_TYPE} + ${SOURCES} +) set(CMAKE_BUILD_TYPE Release)