--- ./gr2fonttest/CMakeLists.txt~0	2018-12-20 08:28:50.000000000 +0200
+++ ./gr2fonttest/CMakeLists.txt	2019-05-09 13:26:12.607250000 +0300
@@ -10,6 +10,7 @@ endif()
 
 add_executable(gr2fonttest gr2FontTest.cpp UtfCodec.cpp)
 target_link_libraries(gr2fonttest graphite2)
+set_target_properties(gr2fonttest PROPERTIES  LINK_FLAGS "-static-libstdc++ -static-libgcc")
 
 if (BUILD_SHARED_LIBS)
     # copy the DLL so that gr2fonttest can find it
--- ./src/CMakeLists.txt~0	2018-12-20 08:28:50.000000000 +0200
+++ ./src/CMakeLists.txt	2019-05-09 13:09:20.310375000 +0300
@@ -100,7 +100,48 @@ set_target_properties(graphite2 PROPERTI
                                             VERSION ${GRAPHITE_VERSION}
                                             LT_VERSION_CURRENT ${GRAPHITE_API_CURRENT}
                                             LT_VERSION_REVISION ${GRAPHITE_API_REVISION}
-                                            LT_VERSION_AGE ${GRAPHITE_API_AGE})
+                                            LT_VERSION_AGE ${GRAPHITE_API_AGE}
+                                            LINK_FLAGS "-static-libstdc++ -static-libgcc")
+
+add_library(graphite2_static STATIC
+    ${GRAPHITE2_VM_TYPE}_machine.cpp
+    gr_char_info.cpp
+    gr_features.cpp
+    gr_face.cpp
+    gr_font.cpp
+    gr_logging.cpp
+    gr_segment.cpp
+    gr_slot.cpp
+    CmapCache.cpp
+    Code.cpp
+    Collider.cpp
+    Decompressor.cpp
+    Face.cpp
+    FeatureMap.cpp
+    Font.cpp
+    GlyphFace.cpp
+    GlyphCache.cpp
+    Intervals.cpp
+    Justifier.cpp
+    NameTable.cpp
+    Pass.cpp
+    Position.cpp
+    Segment.cpp
+    Silf.cpp
+    Slot.cpp
+    Sparse.cpp
+    TtfUtil.cpp
+    UtfCodec.cpp
+    ${FILEFACE}
+    ${TRACING})
+
+set_target_properties(graphite2_static PROPERTIES PUBLIC_HEADER "${GRAPHITE_HEADERS}"
+                                                  SOVERSION ${GRAPHITE_SO_VERSION}
+                                                  VERSION ${GRAPHITE_VERSION}
+                                                  LT_VERSION_CURRENT ${GRAPHITE_API_CURRENT}
+                                                  LT_VERSION_REVISION ${GRAPHITE_API_REVISION}
+                                                  LT_VERSION_AGE ${GRAPHITE_API_AGE} 
+                                                  OUTPUT_NAME graphite2)
 
 if  (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
     set_target_properties(graphite2 PROPERTIES
