build: set c standard if not set
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 215201f..e39b91c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -50,6 +50,10 @@
 set(libdir ${CMAKE_INSTALL_PREFIX}/lib)
 set(includedir ${CMAKE_INSTALL_PREFIX}/include)
 
+if(NOT CMAKE_C_STANDARD)
+  set(CMAKE_C_STANDARD 11)
+endif()
+
 if(NOT CMAKE_BUILD_TYPE)
   if(COSE_C_OPTIMIZE)
     set(CMAKE_BUILD_TYPE MinSizeRel)