You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

sqlite.cmake 1.5 kB

123456789101112131415161718192021222324252627282930
  1. if (WIN32)
  2. mindspore_add_pkg(sqlite
  3. VER 3.31.1
  4. LIBS sqlite3
  5. URL https://sqlite.org/2020/sqlite-amalgamation-3310100.zip
  6. MD5 2b7bfcdd97dc281903a9aee966213fe4
  7. PATCHES ${CMAKE_SOURCE_DIR}/third_party/patch/sqlite/sqlite.windows.patch001 ${CMAKE_SOURCE_DIR}/third_party/patch/sqlite/sqlite.windows.patch002 ${CMAKE_SOURCE_DIR}/third_party/patch/sqlite/sqlite.windows.patch003
  8. CMAKE_OPTION " "
  9. )
  10. else ()
  11. set(sqlite_USE_STATIC_LIBS ON)
  12. set(sqlite_CXXFLAGS)
  13. if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
  14. set(sqlite_CFLAGS "-fstack-protector-all -Wno-uninitialized -Wno-unused-parameter -fPIC -D_FORTIFY_SOURCE=2 -O2")
  15. else()
  16. set(sqlite_CFLAGS "-fstack-protector-all -Wno-maybe-uninitialized -Wno-unused-parameter -fPIC -D_FORTIFY_SOURCE=2 -O2")
  17. endif()
  18. set(sqlite_LDFLAGS "-Wl,-z,relro,-z,now,-z,noexecstack")
  19. mindspore_add_pkg(sqlite
  20. VER 3.31.1
  21. LIBS sqlite3
  22. URL https://github.com/sqlite/sqlite/archive/version-3.31.1.tar.gz
  23. MD5 5f4e7b4016c15f4fb5855615279819da
  24. PATCHES ${CMAKE_SOURCE_DIR}/third_party/patch/sqlite/sqlite.patch001 ${CMAKE_SOURCE_DIR}/third_party/patch/sqlite/sqlite.patch002 ${CMAKE_SOURCE_DIR}/third_party/patch/sqlite/sqlite.patch003
  25. CONFIGURE_COMMAND ./configure --enable-shared=no --disable-tcl --disable-editline --enable-json1)
  26. endif ()
  27. include_directories(${sqlite_INC})
  28. add_library(mindspore::sqlite ALIAS sqlite::sqlite3)