aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorEugene Kliuchnikov <eustas@google.com>2017-04-23 14:07:08 +0200
committerGitHub <noreply@github.com>2017-04-23 14:07:08 +0200
commit6ece1d8791a887c1b3fd500435be97d42921cee7 (patch)
treecc5504ff795d2d28efaccc8e30d4c72e0acd1eab /CMakeLists.txt
parent04de756ad2b0a8f58987d415ef520467e3440f20 (diff)
downloadbrotli-6ece1d8791a887c1b3fd500435be97d42921cee7.zip
brotli-6ece1d8791a887c1b3fd500435be97d42921cee7.tar.gz
brotli-6ece1d8791a887c1b3fd500435be97d42921cee7.tar.bz2
Move files & update paths (#541)
* Move files & update paths * Rename build to scripts. * Fix paths * Fix script.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt56
1 files changed, 28 insertions, 28 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ca612d1..ca54890 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -73,7 +73,7 @@ function(hex_to_dec HEXADECIMAL DECIMAL)
endfunction(hex_to_dec)
# Version information
-file(STRINGS "common/version.h" _brotli_version_line REGEX "^#define BROTLI_VERSION (0x[0-9a-fA-F]+)$")
+file(STRINGS "c/common/version.h" _brotli_version_line REGEX "^#define BROTLI_VERSION (0x[0-9a-fA-F]+)$")
string(REGEX REPLACE "^#define BROTLI_VERSION 0x([0-9a-fA-F]+)$" "\\1" _brotli_version_hex "${_brotli_version_line}")
hex_to_dec("${_brotli_version_hex}" _brotli_version)
math(EXPR BROTLI_VERSION_MAJOR "${_brotli_version} >> 24")
@@ -112,7 +112,7 @@ if(NOT LOG2_RES)
endif()
unset(LOG2_RES)
-set(BROTLI_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/include")
+set(BROTLI_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/c/include")
set(BROTLI_LIBRARIES_CORE brotlienc brotlidec brotlicommon)
set(BROTLI_LIBRARIES ${BROTLI_LIBRARIES_CORE} ${LIBM_LIBRARY})
mark_as_advanced(BROTLI_INCLUDE_DIRS BROTLI_LIBRARIES)
@@ -126,30 +126,30 @@ elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
endif()
add_library(brotlicommon
- common/dictionary.c)
+ c/common/dictionary.c)
add_library(brotlidec
- dec/bit_reader.c
- dec/decode.c
- dec/huffman.c
- dec/state.c)
+ c/dec/bit_reader.c
+ c/dec/decode.c
+ c/dec/huffman.c
+ c/dec/state.c)
add_library(brotlienc
- enc/backward_references.c
- enc/backward_references_hq.c
- enc/bit_cost.c
- enc/block_splitter.c
- enc/brotli_bit_stream.c
- enc/cluster.c
- enc/compress_fragment.c
- enc/compress_fragment_two_pass.c
- enc/dictionary_hash.c
- enc/encode.c
- enc/entropy_encode.c
- enc/histogram.c
- enc/literal_cost.c
- enc/memory.c
- enc/metablock.c
- enc/static_dict.c
- enc/utf8_util.c)
+ c/enc/backward_references.c
+ c/enc/backward_references_hq.c
+ c/enc/bit_cost.c
+ c/enc/block_splitter.c
+ c/enc/brotli_bit_stream.c
+ c/enc/cluster.c
+ c/enc/compress_fragment.c
+ c/enc/compress_fragment_two_pass.c
+ c/enc/dictionary_hash.c
+ c/enc/encode.c
+ c/enc/entropy_encode.c
+ c/enc/histogram.c
+ c/enc/literal_cost.c
+ c/enc/memory.c
+ c/enc/metablock.c
+ c/enc/static_dict.c
+ c/enc/utf8_util.c)
# Older CMake versions does not understand INCLUDE_DIRECTORIES property.
include_directories(${BROTLI_INCLUDE_DIRS})
@@ -182,7 +182,7 @@ if(BROTLI_PARENT_DIRECTORY)
endif()
# Build the bro executable
-add_executable(bro tools/bro.c)
+add_executable(bro c/tools/bro.c)
target_link_libraries(bro ${BROTLI_LIBRARIES})
# Installation
@@ -229,9 +229,9 @@ if(NOT BROTLI_DISABLE_TESTS)
tests/testdata/asyoulik.txt
tests/testdata/lcet10.txt
tests/testdata/plrabn12.txt
- enc/encode.c
- common/dictionary.h
- dec/decode.c)
+ c/enc/encode.c
+ c/common/dictionary.h
+ c/dec/decode.c)
foreach(INPUT ${ROUNDTRIP_INPUTS})
get_filename_component(OUTPUT_NAME "${INPUT}" NAME)