CMakeLists.txt 1.1 KB

1234567891011121314151617181920212223242526
  1. # Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. # All rights reserved.
  3. #
  4. # This software is supplied "AS IS" without any warranties.
  5. # RDA assumes no responsibility or liability for the use of the software,
  6. # conveys no license or title under any patent, copyright, or mask work
  7. # right to the product. RDA reserves the right to make changes in the
  8. # software without notification. RDA also make no representation or
  9. # warranty that such application will be suitable for the specified use
  10. # without further testing or modification.
  11. install_header(lib/lz4.h ${out_inc_dir}/lz4/lz4.h)
  12. install_header(src/lz4lite.h ${out_inc_dir}/lz4/lz4lite.h)
  13. set(target lz4)
  14. add_app_libraries($<TARGET_FILE:${target}>)
  15. add_library(${target} STATIC lib/lz4.c src/lz4lite.c)
  16. set_target_properties(${target} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${out_lib_dir})
  17. # target_compile_options(${target} PRIVATE -O2)
  18. target_include_directories(${target} PUBLIC include)
  19. target_include_directories(${target} PRIVATE lib)
  20. target_include_targets(${target} PRIVATE kernel)
  21. relative_glob(srcs include/*/*.h src/*.[ch])
  22. beautify_c_code(${target} ${srcs})