mirror of
https://github.com/google/brotli.git
synced 2024-11-28 22:21:05 +00:00
Merge pull request #439 from fred-wang/remove-underscore
Remove the underscore in the name of brotli libraries. #326
This commit is contained in:
commit
d767ab9eb0
14
BUILD
14
BUILD
@ -66,7 +66,7 @@ cc_library(
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "brotli_common",
|
||||
name = "brotlicommon",
|
||||
srcs = [":common_sources"],
|
||||
hdrs = [":common_headers"],
|
||||
copts = STRICT_C_OPTIONS,
|
||||
@ -74,20 +74,20 @@ cc_library(
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "brotli_dec",
|
||||
name = "brotlidec",
|
||||
srcs = [":dec_sources"],
|
||||
hdrs = [":dec_headers"],
|
||||
copts = STRICT_C_OPTIONS,
|
||||
deps = [":brotli_common"],
|
||||
deps = [":brotlicommon"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "brotli_enc",
|
||||
name = "brotlienc",
|
||||
srcs = [":enc_sources"],
|
||||
hdrs = [":enc_headers"],
|
||||
copts = STRICT_C_OPTIONS,
|
||||
linkopts = ["-lm"],
|
||||
deps = [":brotli_common"],
|
||||
deps = [":brotlicommon"],
|
||||
)
|
||||
|
||||
cc_binary(
|
||||
@ -96,7 +96,7 @@ cc_binary(
|
||||
copts = STRICT_C_OPTIONS,
|
||||
linkstatic = 1,
|
||||
deps = [
|
||||
":brotli_dec",
|
||||
":brotli_enc",
|
||||
":brotlidec",
|
||||
":brotlienc",
|
||||
],
|
||||
)
|
||||
|
@ -106,7 +106,7 @@ endif()
|
||||
unset(LOG2_RES)
|
||||
|
||||
set(BROTLI_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/include")
|
||||
set(BROTLI_LIBRARIES_CORE brotli_enc brotli_dec brotli_common)
|
||||
set(BROTLI_LIBRARIES_CORE brotlienc brotlidec brotlicommon)
|
||||
set(BROTLI_LIBRARIES ${BROTLI_LIBRARIES_CORE} ${LIBM_LIBRARY})
|
||||
mark_as_advanced(BROTLI_INCLUDE_DIRS BROTLI_LIBRARIES)
|
||||
|
||||
@ -118,14 +118,14 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
add_definitions(-DOS_MACOSX)
|
||||
endif()
|
||||
|
||||
add_library(brotli_common
|
||||
add_library(brotlicommon
|
||||
common/dictionary.c)
|
||||
add_library(brotli_dec
|
||||
add_library(brotlidec
|
||||
dec/bit_reader.c
|
||||
dec/decode.c
|
||||
dec/huffman.c
|
||||
dec/state.c)
|
||||
add_library(brotli_enc
|
||||
add_library(brotlienc
|
||||
enc/backward_references.c
|
||||
enc/bit_cost.c
|
||||
enc/block_splitter.c
|
||||
@ -145,7 +145,7 @@ add_library(brotli_enc
|
||||
# Older CMake versions does not understand INCLUDE_DIRECTORIES property.
|
||||
include_directories(${BROTLI_INCLUDE_DIRS})
|
||||
|
||||
foreach(lib brotli_common brotli_dec brotli_enc)
|
||||
foreach(lib brotlicommon brotlidec brotlienc)
|
||||
target_link_libraries(${lib} ${LIBM_LIBRARY})
|
||||
set_property(TARGET ${lib} APPEND PROPERTY INCLUDE_DIRECTORIES ${BROTLI_INCLUDE_DIRS})
|
||||
set_target_properties(${lib} PROPERTIES
|
||||
@ -155,8 +155,8 @@ foreach(lib brotli_common brotli_dec brotli_enc)
|
||||
set_property(TARGET ${lib} APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${BROTLI_INCLUDE_DIRS}")
|
||||
endforeach()
|
||||
if (BUILD_SHARED_LIBS)
|
||||
target_link_libraries(brotli_dec brotli_common)
|
||||
target_link_libraries(brotli_enc brotli_common)
|
||||
target_link_libraries(brotlidec brotlicommon)
|
||||
target_link_libraries(brotlienc brotlicommon)
|
||||
endif()
|
||||
|
||||
# For projects stuck on older versions of CMake, this will set the
|
||||
|
28
premake5.lua
28
premake5.lua
@ -26,46 +26,46 @@ configuration "linux"
|
||||
configuration { "macosx" }
|
||||
defines { "OS_MACOSX" }
|
||||
|
||||
project "brotli_common"
|
||||
project "brotlicommon"
|
||||
kind "SharedLib"
|
||||
language "C"
|
||||
files { "common/**.h", "common/**.c" }
|
||||
|
||||
project "brotli_common_static"
|
||||
project "brotlicommon_static"
|
||||
kind "StaticLib"
|
||||
targetname "brotli_common"
|
||||
targetname "brotlicommon"
|
||||
language "C"
|
||||
files { "common/**.h", "common/**.c" }
|
||||
|
||||
project "brotli_dec"
|
||||
project "brotlidec"
|
||||
kind "SharedLib"
|
||||
language "C"
|
||||
files { "dec/**.h", "dec/**.c" }
|
||||
links "brotli_common"
|
||||
links "brotlicommon"
|
||||
|
||||
project "brotli_dec_static"
|
||||
project "brotlidec_static"
|
||||
kind "StaticLib"
|
||||
targetname "brotli_dec"
|
||||
targetname "brotlidec"
|
||||
language "C"
|
||||
files { "dec/**.h", "dec/**.c" }
|
||||
links "brotli_common_static"
|
||||
links "brotlicommon_static"
|
||||
|
||||
project "brotli_enc"
|
||||
project "brotlienc"
|
||||
kind "SharedLib"
|
||||
language "C"
|
||||
files { "enc/**.h", "enc/**.c" }
|
||||
links "brotli_common"
|
||||
links "brotlicommon"
|
||||
|
||||
project "brotli_enc_static"
|
||||
project "brotlienc_static"
|
||||
kind "StaticLib"
|
||||
targetname "brotli_enc"
|
||||
targetname "brotlienc"
|
||||
language "C"
|
||||
files { "enc/**.h", "enc/**.c" }
|
||||
links "brotli_common_static"
|
||||
links "brotlicommon_static"
|
||||
|
||||
project "bro"
|
||||
kind "ConsoleApp"
|
||||
language "C"
|
||||
linkoptions "-static"
|
||||
files { "tools/bro.c" }
|
||||
links { "brotli_common_static", "brotli_dec_static", "brotli_enc_static" }
|
||||
links { "brotlicommon_static", "brotlidec_static", "brotlienc_static" }
|
||||
|
Loading…
Reference in New Issue
Block a user