Skip to content

Commit fa9289a

Browse files
committed
Add first native Chromium component porting scaffold
1 parent 6c8c90b commit fa9289a

1 file changed

Lines changed: 30 additions & 0 deletions

File tree

‎native/CMakeLists.txt‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
cmake_minimum_required(VERSION 3.22)
2+
project(netormium_chromium_components C)
3+
4+
include(FetchContent)
5+
6+
# Brotli is shipped in Chromium's third_party tree and is independently
7+
# buildable. Pin the upstream release for reproducible native builds.
8+
set(BROTLI_DISABLE_TESTS ON CACHE BOOL "" FORCE)
9+
set(BROTLI_BUNDLED_MODE ON CACHE BOOL "" FORCE)
10+
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
11+
12+
FetchContent_Declare(
13+
brotli
14+
GIT_REPOSITORY https://github.com/google/brotli.git
15+
GIT_TAG v1.1.0
16+
GIT_SHALLOW TRUE
17+
)
18+
FetchContent_MakeAvailable(brotli)
19+
20+
# Expose only the decoder to the first Netormium integration milestone.
21+
# The Android companion can link this target without bundling the encoder
22+
# or command-line tool in its runtime.
23+
add_library(netormium_brotli_decoder INTERFACE)
24+
target_link_libraries(netormium_brotli_decoder INTERFACE brotlidec)
25+
target_include_directories(netormium_brotli_decoder INTERFACE
26+
"${brotli_SOURCE_DIR}/c/include"
27+
)
28+
29+
message(STATUS "Netormium native component: upstream Google Brotli v1.1.0")
30+
message(STATUS "Brotli decoder target: netormium_brotli_decoder")

0 commit comments

Comments
 (0)