projects
/
lwext4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2d9c5b5
)
CMake: Added option whether to build static or shared library
author
Max
<max.maisel@posteo.de>
Thu, 1 Mar 2018 16:20:35 +0000
(17:20 +0100)
committer
Max Maisel
<max.maisel@posteo.de>
Thu, 1 Mar 2018 17:13:11 +0000
(18:13 +0100)
src/CMakeLists.txt
patch
|
blob
|
history
diff --git
a/src/CMakeLists.txt
b/src/CMakeLists.txt
index 82d6a6b08c642d02468b2c8fc904c331aa9d34c9..3b82fcf6a7d646ab53de28cb7485dc228ad3dae9 100644
(file)
--- 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)