Made building of programs optional in CMake
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ac4be4c..00e0af5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -40,6 +40,7 @@
 option(USE_PKCS11_HELPER_LIBRARY "Build PolarSSL with the pkcs11-helper library." OFF)
 
 option(ENABLE_ZLIB_SUPPORT "Build PolarSSL with zlib library." OFF)
+option(ENABLE_PROGRAMS "Build PolarSSL programs." ON)
 
 if(LIB_INSTALL_DIR)
 else()
@@ -66,7 +67,9 @@
   add_subdirectory(tests)
 endif(CMAKE_COMPILER_IS_CLANG)
 
-add_subdirectory(programs)
+if(ENABLE_PROGRAMS)
+  add_subdirectory(programs)
+endif()
 
 ADD_CUSTOM_TARGET(apidoc
                   COMMAND doxygen doxygen/polarssl.doxyfile