From 66d6925bdad183f71b98c1d0a0a280e22f290a58 Mon Sep 17 00:00:00 2001 From: Charlie Jiang Date: Mon, 20 Jun 2022 16:22:08 +0800 Subject: [PATCH 1/2] * /src/ftinspect/.gitignore: Ignore Visual Studio specific files. This is for `ftinspect`. --- src/ftinspect/.gitignore | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ftinspect/.gitignore b/src/ftinspect/.gitignore index 792ca43..da9ddb4 100644 --- a/src/ftinspect/.gitignore +++ b/src/ftinspect/.gitignore @@ -4,3 +4,8 @@ ftinspect moc_*.cpp moc_*.h .qmake.stash + +# Visual Studio specific +out +.vs +CMakeSettings.json -- GitLab From bfbed48e9255edea442bb557cafc9b352b6097af Mon Sep 17 00:00:00 2001 From: Charlie Jiang Date: Tue, 21 Jun 2022 13:30:00 +0800 Subject: [PATCH 2/2] [ftinspect] Drop QMake, add CMake. * src/ftinspect/CMakeLists.txt: Add CMake build file for `ftinspect`. * src/ftinspect/ftinspect.pro: Remove QMake build file. Fixes #11 --- src/ftinspect/CMakeLists.txt | 38 +++++++++++++++++++++++++ src/ftinspect/ftinspect.pro | 54 ------------------------------------ 2 files changed, 38 insertions(+), 54 deletions(-) create mode 100644 src/ftinspect/CMakeLists.txt delete mode 100644 src/ftinspect/ftinspect.pro diff --git a/src/ftinspect/CMakeLists.txt b/src/ftinspect/CMakeLists.txt new file mode 100644 index 0000000..c910e05 --- /dev/null +++ b/src/ftinspect/CMakeLists.txt @@ -0,0 +1,38 @@ +cmake_minimum_required (VERSION 3.0) +cmake_policy(SET CMP0074 NEW) +set(CMAKE_CXX_STANDARD 11) + +project("ftinspect") + +if (WIN32) + add_compile_options("/utf-8") +endif () + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +find_package(Qt5 COMPONENTS Widgets REQUIRED) +find_package(Freetype REQUIRED) + +add_executable(ftinspect + "ftinspect.cpp" + "maingui.cpp" + + "engine/engine.cpp" + + "rendering/glyphbitmap.cpp" + "rendering/glyphoutline.cpp" + "rendering/glyphpointnumbers.cpp" + "rendering/glyphpoints.cpp" + "rendering/grid.cpp" + + "widgets/qcomboboxx.cpp" + "widgets/qgraphicsviewx.cpp" + "widgets/qpushbuttonx.cpp" + "widgets/qspinboxx.cpp" +) +target_link_libraries(ftinspect + Qt5::Core Qt5::Widgets + Freetype::Freetype +) diff --git a/src/ftinspect/ftinspect.pro b/src/ftinspect/ftinspect.pro deleted file mode 100644 index 3bf928f..0000000 --- a/src/ftinspect/ftinspect.pro +++ /dev/null @@ -1,54 +0,0 @@ -# ftinspect.pro - -QMAKE_CXXFLAGS += -isystem ../../../freetype/include - -# To avoid conflicts with the FreeType version compiled into or used by Qt, -# we use the static library. -# -# You should adapt this to your setup. -unix|macx { - LIBS += ../../../freetype/objs/.libs/libfreetype.a - - CONFIG += link_pkgconfig - PKGCONFIG += libpng harfbuzz zlib bzip2 libbrotlidec librsvg-2.0 -} -win32 { - LIBS += ../../../freetyp2/objs/vc2010/freetype.lib - LIBS += -lpng -lharfbuzz -lz -lbz2 -lm -lbrotlidec -lrsvg-2 -} - -CONFIG += qt debug - -SOURCES += \ - engine/engine.cpp \ - rendering/glyphbitmap.cpp \ - rendering/glyphoutline.cpp \ - rendering/glyphpointnumbers.cpp \ - rendering/glyphpoints.cpp \ - rendering/grid.cpp \ - widgets/qcomboboxx.cpp \ - widgets/qgraphicsviewx.cpp \ - widgets/qpushbuttonx.cpp \ - widgets/qspinboxx.cpp \ - ftinspect.cpp \ - maingui.cpp - -HEADERS += \ - engine/engine.hpp \ - rendering/glyphbitmap.hpp \ - rendering/glyphoutline.hpp \ - rendering/glyphpointnumbers.hpp \ - rendering/glyphpoints.hpp \ - rendering/grid.hpp \ - widgets/qcomboboxx.hpp \ - widgets/qgraphicsviewx.hpp \ - widgets/qpushbuttonx.hpp \ - widgets/qspinboxx.hpp \ - maingui.hpp - -TARGET = ftinspect - -QT += widgets - - -# end of ftinpect.pro -- GitLab