freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2-demos] reorg-widgets 08dc90d 1/2: [ftinspect] Drop QMake, ad


From: Werner Lemberg
Subject: [freetype2-demos] reorg-widgets 08dc90d 1/2: [ftinspect] Drop QMake, add CMake
Date: Mon, 27 Jun 2022 07:49:57 -0400 (EDT)

branch: reorg-widgets
commit 08dc90d57166c0494b1fcf10c8cb52531aa56108
Author: Charlie Jiang <w@chariri.moe>
Commit: Charlie Jiang <w@chariri.moe>

    [ftinspect] Drop QMake, add CMake
    
    * src/ftinspect/CMakeLists.txt: Add CMake build file for ftinspect
    * src/ftinspect/ftinspect.pro: Remove QMake build file
---
 src/ftinspect/CMakeLists.txt | 38 +++++++++++++++++++++++++++++++
 src/ftinspect/ftinspect.pro  | 54 --------------------------------------------
 2 files changed, 38 insertions(+), 54 deletions(-)

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]