The chromium project is a very complex project, in which the base library provides many useful functions. However, chromium is built using gn, the dependencies are also relatively complex. It is difficult to use the base library in your project. So this project can help you use it very conveniently, because it is built based on cmake.
Each platform provides a script. Running the script will automatically pull the code and third-party dependent libraries, and generate solutions for the corresponding platform, such as windows to generate vs projects, mac and ios to generate xcode projects, etc.
- build shared: -DCHROM_BUILD_SHARED=ON
- visual studio: 2022
- windows sdk: 10.0.26100.0
- clang
1 .\vs_generate.bat
2 Open the project located in the out/win directory through VS 2022.
You can also make use of other versions of VS.
-DPLATFORM:
# OS = armv7 armv7s arm64 (if applicable)
# OS64 = arm64 (if applicable)
# SIMULATOR = i386
# SIMULATOR64 = x86_64
# SIMULATORARM64 = arm64
# MAC = x86_64
# MAC_ARM64 = arm64
MAC
1 .\osx_generate.sh
2 Open the project located in the out/macosx directory through XCode.
iOS
1 .\ios_generate.sh
2 Open the project located in the out/ios directory through XCode.
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-17 main"
sudo apt update
sudo apt install clang-17
sudo apt-get install libc++-17-dev libc++abi-17-dev
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-17 100
//cmake . -B out/linux -DCMAKE_TOOLCHAIN_FILE=cmake/toolchain/x86_64-linux-clang.toolchain.cmake -DLINUX=ON -DPOSIX=ON -DCMAKE_CONFIGURATION_TYPES=Debug -DCMAKE_BUILD_TYPE=Debug
.\linux_generate.sh
Open the project located in the example/Android directory through Android Studio.