+option(ENABLE_CURL "Enable cURL support for fetching media" 1)
+
+if (NOT ENABLE_CURL)
+ mark_as_advanced(CLEAR CURL_LIBRARY CURL_INCLUDE_DIR)
+endif(NOT ENABLE_CURL)
+
+if( ENABLE_CURL )
+ find_package(CURL)
+endif( ENABLE_CURL )
+set(USE_CURL 0)
+if (CURL_FOUND AND ENABLE_CURL)
+ message(STATUS "cURL support enabled")
+ set(USE_CURL 1)
+endif(CURL_FOUND AND ENABLE_CURL)
+