diff options
| author | gkostka <kostka.grzegorz@gmail.com> | 2016-03-31 20:43:31 +0200 |
|---|---|---|
| committer | gkostka <kostka.grzegorz@gmail.com> | 2016-03-31 22:53:44 +0200 |
| commit | 0202d13dec910d55acc5b92c290b9aaa72d8b691 (patch) | |
| tree | 8536346f7ffc7e970d754d127bb82633d41862a3 /src | |
| parent | 5e4248f2e98ac13f30c2b84a7e444691276b85ea (diff) | |
CMake: add library & headers to make install target
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 78b233d..82d6a6b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -2,9 +2,15 @@ #LIBRARY include_directories(.) aux_source_directory(. LWEXT4_SRC) -add_library(lwext4 ${LWEXT4_SRC}) +add_library(lwext4 STATIC ${LWEXT4_SRC}) + if (DEFINED SIZE) add_custom_target(lib_size ALL DEPENDS lwext4 COMMAND ${SIZE} liblwext4.a) else() endif() + +if (DEFINED INSTALL_LIB) +INSTALL(TARGETS lwext4 DESTINATION /usr/local/lib) +INSTALL(DIRECTORY ${PROJECT_BINARY_DIR}/include/. DESTINATION /usr/local/include/lwext4) +endif()
\ No newline at end of file |
