shithub: lwext4

Download patch

ref: cc37917dfb7785b7a2deb375026cb476d1a60beb
parent: 2d9c5b5d776dcaa543b4a37f738617dfca64fff1
author: Max <[email protected]>
date: Thu Mar 1 12:20:35 EST 2018

CMake: Added option whether to build static or shared library

--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,8 +1,14 @@
 
+option(LWEXT4_BUILD_SHARED_LIB "Build shared library" OFF)
+
 #LIBRARY
 include_directories(.)
 aux_source_directory(. LWEXT4_SRC)
-add_library(lwext4 STATIC ${LWEXT4_SRC})
+if(LWEXT4_BUILD_SHARED_LIB)
+  add_library(lwext4 SHARED ${LWEXT4_SRC})
+else()
+  add_library(lwext4 STATIC ${LWEXT4_SRC})
+endif()
 
 if  (DEFINED SIZE)
     add_custom_target(lib_size ALL DEPENDS lwext4 COMMAND ${SIZE} liblwext4.a)