Split root CmakeLists.txt into smaller nested ones.
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
new file mode 100644
index 0000000..f7a4d5d
--- /dev/null
+++ b/examples/CMakeLists.txt
@@ -0,0 +1,17 @@
+# Copyright 2017 Google Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+add_subdirectory(expat)
+add_subdirectory(libfuzzer)
+add_subdirectory(libxml2)
diff --git a/examples/expat/CMakeLists.txt b/examples/expat/CMakeLists.txt
new file mode 100644
index 0000000..e10d910
--- /dev/null
+++ b/examples/expat/CMakeLists.txt
@@ -0,0 +1,37 @@
+# Copyright 2017 Google Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set(EXPAT_CFLAGS "${CMAKE_C_FLAGS} ${FUZZING_FLAGS} -w")
+set(EXPAT_CXXFLAGS "${CMAKE_CXX_FLAGS} ${FUZZING_FLAGS} -w")
+include(expat)
+
+add_executable(expat_example
+               expat_example.cc)
+target_link_libraries(expat_example
+                      protobuf-mutator-xml
+                      ${LIB_PROTO_MUTATOR_FUZZER_LIBRARIES}
+                      ${EXPAT_LIBRARIES})
+set_property(TARGET expat_example
+             PROPERTY COMPILE_FLAGS ${FUZZING_FLAGS})
+set_property(TARGET expat_example
+             PROPERTY LINK_FLAGS ${FUZZING_FLAGS})
+
+add_executable(expat_example_test
+               expat_example_test.cc)
+add_dependencies(expat_example_test expat_example)
+target_link_libraries(expat_example_test
+                      ${GTEST_BOTH_LIBRARIES}
+                      ${CMAKE_THREAD_LIBS_INIT})
+add_test(test.expat_example_test expat_example_test --gtest_color=yes AUTO)
+add_dependencies(check expat_example_test)
diff --git a/examples/libfuzzer/CMakeLists.txt b/examples/libfuzzer/CMakeLists.txt
new file mode 100644
index 0000000..173363c
--- /dev/null
+++ b/examples/libfuzzer/CMakeLists.txt
@@ -0,0 +1,37 @@
+# Copyright 2017 Google Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+protobuf_generate_cpp(LIB_FUZZER_EXAMPLE_PROTO_SRCS
+                      LIB_FUZZER_EXAMPLE_PROTO_HDRS
+                      libfuzzer_example.proto)
+add_executable(libfuzzer_example
+               libfuzzer_example.cc
+               ${LIB_FUZZER_EXAMPLE_PROTO_SRCS})
+target_link_libraries(libfuzzer_example
+                      protobuf-mutator
+                      ${LIB_PROTO_MUTATOR_FUZZER_LIBRARIES})
+set_property(TARGET libfuzzer_example
+             PROPERTY COMPILE_FLAGS ${FUZZING_FLAGS})
+set_property(TARGET libfuzzer_example
+             PROPERTY LINK_FLAGS ${FUZZING_FLAGS})
+
+add_executable(libfuzzer_example_test
+               libfuzzer_example_test.cc)
+add_dependencies(libfuzzer_example_test libfuzzer_example)
+target_link_libraries(libfuzzer_example_test
+                      ${GTEST_BOTH_LIBRARIES}
+                      ${CMAKE_THREAD_LIBS_INIT})
+add_test(test.libfuzzer_example_test libfuzzer_example_test --gtest_color=yes AUTO)
+
+add_dependencies(check libfuzzer_example_test)
diff --git a/examples/libfuzzer/libfuzzer_example.cc b/examples/libfuzzer/libfuzzer_example.cc
index e497fe9..51a583e 100644
--- a/examples/libfuzzer/libfuzzer_example.cc
+++ b/examples/libfuzzer/libfuzzer_example.cc
@@ -15,7 +15,7 @@
 #include <cstddef>
 #include <cstdint>
 
-#include "libfuzzer_example.pb.h"  // NOLINT
+#include "examples/libfuzzer/libfuzzer_example.pb.h"
 #include "src/libfuzzer_protobuf_mutator.h"
 
 using libfuzzer_example::Msg;
diff --git a/examples/libfuzzer/libfuzzer_example_test.cc b/examples/libfuzzer/libfuzzer_example_test.cc
index b40aa91..d18b4cb 100644
--- a/examples/libfuzzer/libfuzzer_example_test.cc
+++ b/examples/libfuzzer/libfuzzer_example_test.cc
@@ -24,7 +24,7 @@
   auto dir = mkdtemp(dir_template);
   ASSERT_TRUE(dir);
 
-  std::string cmd = "./libfuzzer_example -max_len=70 -artifact_prefix=" +
+  std::string cmd = "./libfuzzer_example -max_len=150 -artifact_prefix=" +
                     std::string(dir) + "/ " + dir + "/";
   int retvalue = std::system(cmd.c_str());
   EXPECT_EQ(kDefaultLibFuzzerError, WSTOPSIG(retvalue));
diff --git a/examples/libxml2/CMakeLists.txt b/examples/libxml2/CMakeLists.txt
new file mode 100644
index 0000000..f39e35d
--- /dev/null
+++ b/examples/libxml2/CMakeLists.txt
@@ -0,0 +1,38 @@
+# Copyright 2017 Google Inc. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+set(LIBXML2_CFLAGS "${CMAKE_C_FLAGS} ${FUZZING_FLAGS} -w")
+set(LIBXML2_CXXFLAGS "${CMAKE_CXX_FLAGS} ${FUZZING_FLAGS} -w")
+include(libxml2)
+add_executable(libxml2_example
+               libxml2_example.cc)
+target_link_libraries(libxml2_example
+                      protobuf-mutator-xml
+                      ${LIB_PROTO_MUTATOR_FUZZER_LIBRARIES}
+                      ${LIBXML2_LIBRARIES}
+                      ${ZLIB_LIBRARIES}
+                      ${LIBLZMA_LIBRARIES})
+set_property(TARGET libxml2_example
+             PROPERTY COMPILE_FLAGS ${FUZZING_FLAGS})
+set_property(TARGET libxml2_example
+             PROPERTY LINK_FLAGS ${FUZZING_FLAGS})
+
+add_executable(libxml2_example_test
+               libxml2_example_test.cc)
+add_dependencies(libxml2_example_test libxml2_example)
+target_link_libraries(libxml2_example_test
+                      ${GTEST_BOTH_LIBRARIES}
+                      ${CMAKE_THREAD_LIBS_INIT})
+add_test(test.libxml2_example_test libxml2_example_test --gtest_color=yes AUTO)
+add_dependencies(check libxml2_example_test)