cmake/add_library: enable library install by default
enable library install by default to support nuttx export for cmake nuttx$ cmake --install build --prefix $PWD/build/staging/ -- Install configuration: "" -- Installing: nuttx/build/staging/lib/libarch.a -- Installing: nuttx/build/staging/lib/libbinfmt.a -- Installing: nuttx/build/staging/lib/libdrivers.a -- Installing: nuttx/build/staging/lib/libfs.a ... Signed-off-by: chao an <anchao@lixiang.com>
This commit is contained in:
parent
04c19bb1c9
commit
fc716802c0
@ -51,6 +51,9 @@ function(nuttx_add_library_internal target)
|
|||||||
target_include_directories(
|
target_include_directories(
|
||||||
${target}
|
${target}
|
||||||
PRIVATE $<GENEX_EVAL:$<TARGET_PROPERTY:nuttx,NUTTX_INCLUDE_DIRECTORIES>>)
|
PRIVATE $<GENEX_EVAL:$<TARGET_PROPERTY:nuttx,NUTTX_INCLUDE_DIRECTORIES>>)
|
||||||
|
|
||||||
|
# Set install config for all library
|
||||||
|
install(TARGETS ${target})
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
# Auxiliary libraries
|
# Auxiliary libraries
|
||||||
@ -101,9 +104,6 @@ function(nuttx_add_system_library target)
|
|||||||
|
|
||||||
# add to list of libraries to link to final nuttx binary
|
# add to list of libraries to link to final nuttx binary
|
||||||
set_property(GLOBAL APPEND PROPERTY NUTTX_SYSTEM_LIBRARIES ${target})
|
set_property(GLOBAL APPEND PROPERTY NUTTX_SYSTEM_LIBRARIES ${target})
|
||||||
|
|
||||||
# install to library dir
|
|
||||||
install(TARGETS ${target} DESTINATION lib)
|
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
# Kernel Libraries
|
# Kernel Libraries
|
||||||
@ -183,11 +183,6 @@ function(nuttx_add_library target)
|
|||||||
|
|
||||||
set_property(GLOBAL APPEND PROPERTY NUTTX_SYSTEM_LIBRARIES ${target})
|
set_property(GLOBAL APPEND PROPERTY NUTTX_SYSTEM_LIBRARIES ${target})
|
||||||
|
|
||||||
get_target_property(target_type ${target} TYPE)
|
|
||||||
if(${target_type} STREQUAL "STATIC_LIBRARY")
|
|
||||||
install(TARGETS ${target} ARCHIVE DESTINATION ${CMAKE_BINARY_DIR}/staging)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
nuttx_add_library_internal(${target})
|
nuttx_add_library_internal(${target})
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user