CMakeLists.txt 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. ### This file is used for build library standalone.
  2. # set this will supress some warnings
  3. set(BUILDING_SDK "yes" CACHE INTERNAL "")
  4. # basic config
  5. cmake_minimum_required(VERSION 3.0)
  6. include(./common.cmake)
  7. project(kendryte)
  8. # config self use headers
  9. include(./macros.internal.cmake)
  10. header_directories(${SDK_ROOT}/lib)
  11. # include lib make file
  12. include(../lib/CMakeLists.txt)
  13. # find headers files to INSTALL
  14. file(GLOB_RECURSE LIB_HEADERS
  15. "../lib/*.h"
  16. "../lib/*.hpp"
  17. )
  18. set_target_properties(kendryte PROPERTIES PUBLIC_HEADER "${LIB_HEADERS}")
  19. # copy .a file and headers
  20. install(TARGETS kendryte
  21. EXPORT kendryte
  22. ARCHIVE
  23. DESTINATION ${CMAKE_BINARY_DIR}/archive
  24. PUBLIC_HEADER DESTINATION ${CMAKE_BINARY_DIR}/archive/include
  25. )
  26. # copy utils files
  27. install(DIRECTORY
  28. ../lds
  29. ../utils
  30. ../cmake
  31. DESTINATION ${CMAKE_BINARY_DIR}/archive
  32. PATTERN "*internal*" EXCLUDE
  33. PATTERN "CMakeLists.txt" EXCLUDE
  34. )
  35. # show information
  36. include(./dump-config.cmake)