diff options
| author | Grzegorz Kostka <kostka.grzegorz@gmail.com> | 2018-03-01 19:51:41 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-03-01 19:51:41 +0100 |
| commit | 66168642b95814725e1f6662729b112d80ab3abb (patch) | |
| tree | 39866e8fbe296731d0993dce8f8e40a538df24d2 /src | |
| parent | 71d088e6525e637279a46c2bb0f01e34c3a72f4a (diff) | |
| parent | cc37917dfb7785b7a2deb375026cb476d1a60beb (diff) | |
Merge pull request #35 from mmmaisel/cmake
CMake: Added option whether to build static or shared library
Diffstat (limited to 'src')
| -rw-r--r-- | src/CMakeLists.txt | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 82d6a6b..3b82fcf 100644 --- 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) |
