Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Cloudef committed Sep 29, 2017
1 parent 662f95b commit a1dc1e3
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 16 deletions.
15 changes: 9 additions & 6 deletions plugins/brieflz/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@ include (SquashPlugin)

set(BRIEFLZ_BUNDLED_MODE ON)
set(BRIEFLZ_TEST_ENABLE TRUE)
add_subdirectory (brieflz)

if(CMAKE_VERSION VERSION_LESS 2.8.11)
include_directories(${BRIEFLZ_INCLUDE_DIRS})
add_definitions(${BRIEFLZ_DEFINITIONS})
endif()

SQUASH_PLUGIN(
SOURCES squash-brieflz.c
NAME brieflz
EMBED_TARGET brieflz
INCLUDE_DIRS ${BRIEFLZ_INCLUDE_DIRS})

if (ENABLE_BRIEFLZ)
add_subdirectory (brieflz)

if(CMAKE_VERSION VERSION_LESS 2.8.11)
include_directories(${BRIEFLZ_INCLUDE_DIRS})
add_definitions(${BRIEFLZ_DEFINITIONS})
endif()
endif ()
13 changes: 8 additions & 5 deletions plugins/brotli/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
include (SquashPlugin)

set(BROTLI_BUNDLED_MODE ON)
add_subdirectory(brotli)

if(CMAKE_VERSION VERSION_LESS 2.8.11)
include_directories(${BROTLI_INCLUDE_DIRS})
endif()

SQUASH_PLUGIN(
SOURCES squash-brotli.c
Expand All @@ -14,3 +9,11 @@ SQUASH_PLUGIN(
C_STANDARD c99
EMBED_TARGET ${BROTLI_LIBRARIES}
EMBED_INCLUDE_DIRS ${BROTLI_INCLUDE_DIRS})

if (ENABLE_BROTLI)
add_subdirectory(brotli)

if(CMAKE_VERSION VERSION_LESS 2.8.11)
include_directories(${BROTLI_INCLUDE_DIRS})
endif()
endif ()
12 changes: 7 additions & 5 deletions plugins/zlib-ng/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ function(generate_cmakein input output)
file(WRITE "${output}" "${output_data}")
endfunction(generate_cmakein)

generate_cmakein("${CMAKE_CURRENT_SOURCE_DIR}/zlib-ng/zconf.h.in" "${CMAKE_CURRENT_BINARY_DIR}/zconf.h.cmakein")

configure_file( ${CMAKE_CURRENT_BINARY_DIR}/zconf.h.cmakein
${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY)

## End copied from zlib-ng

include (SquashPlugin)
Expand Down Expand Up @@ -42,3 +37,10 @@ squash_plugin(
EMBED_COMPILER_FLAGS
-Wno-shift-negative-value)
list (APPEND zlibng_sources ${libzlibng_sources})

if (ENABLE_ZLIB_NG)
generate_cmakein("${CMAKE_CURRENT_SOURCE_DIR}/zlib-ng/zconf.h.in" "${CMAKE_CURRENT_BINARY_DIR}/zconf.h.cmakein")

configure_file( ${CMAKE_CURRENT_BINARY_DIR}/zconf.h.cmakein
${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY)
endif ()

0 comments on commit a1dc1e3

Please sign in to comment.