This repository has been archived by the owner on Apr 22, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathCMakeLists.txt
57 lines (50 loc) · 1.82 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
cmake_minimum_required(VERSION 3.0.0)
project (brotli)
find_package(Java REQUIRED COMPONENTS Development)
find_package(JNI REQUIRED)
if (JNI_FOUND)
message (STATUS "JNI_INCLUDE_DIRS=${JNI_INCLUDE_DIRS}")
message (STATUS "JNI_LIBRARIES=${JNI_LIBRARIES}")
endif()
include_directories(${JNI_INCLUDE_DIRS})
include_directories(${JNI_LIBRARIES})
SET (LIB_TYPE SHARED)
SET (CMAKE_JNI_TARGET TRUE)
SET (CMAKE_CXX_FLAGS "-Wall -O3")
if(WIN32)
SET(STATIC_LIBRARY_CXX_FLAGS /MD)
add_compile_options(/EHsc)
## doesnt work, why ????
string(REPLACE "/O2" "/Ox" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
else(WIN32)
SET(STATIC_LIBRARY_CXX_FLAGS)
endif()
add_library (brotli ${LIB_TYPE} "brotli/common/dictionary.c"
"brotli/enc/backward_references.c"
"brotli/enc/bit_cost.c"
"brotli/enc/block_splitter.c"
"brotli/enc/brotli_bit_stream.c"
"brotli/enc/compressor.cc"
"brotli/enc/cluster.c"
"brotli/enc/compress_fragment.c"
"brotli/enc/compress_fragment_two_pass.c"
"brotli/enc/encode.c"
"brotli/enc/encode_parallel.cc"
"brotli/enc/entropy_encode.c"
"brotli/enc/histogram.c"
"brotli/enc/literal_cost.c"
"brotli/enc/memory.c"
"brotli/enc/metablock.c"
"brotli/enc/static_dict.c"
"brotli/enc/streams.cc"
"brotli/enc/utf8_util.c"
"brotli/dec/bit_reader.c"
"brotli/dec/decode.c"
"brotli/dec/huffman.c"
"brotli/dec/state.c"
"jbrotli-native/src/main/cpp/param_converter.cxx"
"jbrotli-native/src/main/cpp/org_meteogroup_jbrotli_BrotliCompressor.cxx"
"jbrotli-native/src/main/cpp/org_meteogroup_jbrotli_BrotliStreamCompressor.cxx"
"jbrotli-native/src/main/cpp/org_meteogroup_jbrotli_BrotliStreamDeCompressor.cxx"
"jbrotli-native/src/main/cpp/org_meteogroup_jbrotli_BrotliDeCompressor.cxx")
SET_TARGET_PROPERTIES (brotli PROPERTIES LINKER_LANGUAGE CXX)