Add CMake config for building a separate harfbuzz-subset.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index bfe0e30..6199e44 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -253,8 +253,10 @@
 
   ${HB_FALLBACK_sources}
   ${HB_OT_sources}
-  ${HB_OT_RAGEL_GENERATED_sources}
+  ${HB_OT_RAGEL_GENERATED_sources}  
+)
 
+set (subset_project_sources
   ${HB_SUBSET_sources}
 )
 
@@ -268,6 +270,10 @@
   ${HB_SUBSET_headers}
 )
 
+set (subset_project_headers
+  ${HB_SUBSET_headers}
+)
+
 
 ## Find and include needed header folders and libraries
 if (HB_HAVE_FREETYPE)
@@ -530,6 +536,11 @@
 add_library(harfbuzz ${project_sources} ${project_extra_sources} ${project_headers})
 target_link_libraries(harfbuzz ${THIRD_PARTY_LIBS})
 
+## Define harfbuzz-subset library
+add_library(harfbuzz-subset ${subset_project_sources} ${subset_project_headers})
+add_dependencies(harfbuzz-subset harfbuzz)
+target_link_libraries(harfbuzz-subset harfbuzz ${THIRD_PARTY_LIBS})
+
 if (UNIX OR MINGW)
   # Make symbols link locally
   link_libraries(-Bsymbolic-functions)
@@ -540,6 +551,7 @@
     set (CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "m") # libm
     set (CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "")
     set_target_properties(harfbuzz PROPERTIES LINKER_LANGUAGE C)
+    set_target_properties(harfbuzz-subset PROPERTIES LINKER_LANGUAGE C)
   endif ()
 
   # No threadsafe statics as we do it ourselves
@@ -548,7 +560,6 @@
   endif ()
 endif ()
 
-
 ## Define harfbuzz-gobject library
 if (HB_HAVE_GOBJECT)
   add_library(harfbuzz-gobject
@@ -720,7 +731,7 @@
   target_link_libraries(hb-shape harfbuzz)
 
   add_executable(hb-subset ${HB_SUBSET_CLI_sources})
-  target_link_libraries(hb-subset harfbuzz)
+  target_link_libraries(hb-subset harfbuzz harfbuzz-subset)
 
   add_executable(hb-ot-shape-closure ${HB_OT_SHAPE_CLOSURE_sources})
   target_link_libraries(hb-ot-shape-closure harfbuzz)