您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 
 
 
 
 

33 行
1.1 KiB

  1. cmake --version # ensure that you have >= 2.8.8
  2. mkdir build
  3. cd build
  4. cmake ..
  5. make
  6. If you see an error about "Cannot find source file: OBJECT" then your version of CMake is too old.
  7. Note that the default build flags in the top-leve CMakeLists.txt are for
  8. debugging - optimisation isn't enabled.
  9. If you'll be building a lot, then installing Ninja[1] is highly recommended.
  10. Wipe out the build directory and recreate it, but using:
  11. cmake -GNinja ..
  12. ninja
  13. If you want to cross-compile then there are example toolchain files for 32-bit
  14. Intel and ARM in util/. Wipe out the build directory, recreate it and run cmake
  15. like this:
  16. cmake -DCMAKE_TOOLCHAIN_FILE=../util/arm-toolchain.cmake -GNinja ..
  17. If you want to build as a shared library you need to tweak the STATIC tags in
  18. the CMakeLists.txts and also define BORINGSSL_SHARED_LIBRARY and
  19. BORINGSSL_IMPLEMENTATION. On Windows, where functions need to be tagged with
  20. "dllimport" when coming from a shared library, you need just
  21. BORINGSSL_SHARED_LIBRARY defined in the code which #includes the BoringSSL
  22. headers.
  23. [1] http://martine.github.io/ninja/