2015-09-29 00:23:46 +05:30
|
|
|
cmake_minimum_required(VERSION 3.1)
|
2013-09-26 17:19:58 +05:30
|
|
|
|
2013-09-26 06:28:09 +05:30
|
|
|
project(unpack200)
|
|
|
|
|
2015-09-29 00:23:46 +05:30
|
|
|
option(PACK200_BUILD_BINARY "Build a tiny utility that decompresses pack200 streams" OFF)
|
|
|
|
|
2013-09-26 06:28:09 +05:30
|
|
|
# Find ZLIB for quazip
|
2015-09-29 00:23:46 +05:30
|
|
|
find_package(ZLIB REQUIRED)
|
2014-04-06 23:13:09 +05:30
|
|
|
|
|
|
|
set(PACK200_SRC
|
2014-04-09 19:11:49 +05:30
|
|
|
include/unpack200.h
|
|
|
|
src/bands.cpp
|
|
|
|
src/bands.h
|
|
|
|
src/bytes.cpp
|
|
|
|
src/bytes.h
|
|
|
|
src/coding.cpp
|
|
|
|
src/coding.h
|
|
|
|
src/constants.h
|
|
|
|
src/defines.h
|
|
|
|
src/unpack200.cpp
|
|
|
|
src/unpack.cpp
|
|
|
|
src/unpack.h
|
|
|
|
src/utils.cpp
|
|
|
|
src/utils.h
|
|
|
|
src/zip.cpp
|
|
|
|
src/zip.h
|
2013-09-26 06:28:09 +05:30
|
|
|
)
|
|
|
|
|
2013-09-30 06:56:23 +05:30
|
|
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
2013-09-30 00:41:30 +05:30
|
|
|
|
|
|
|
add_library(unpack200 STATIC ${PACK200_SRC})
|
2015-09-29 00:23:46 +05:30
|
|
|
target_include_directories(unpack200
|
|
|
|
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include"
|
|
|
|
PRIVATE ${ZLIB_INCLUDE_DIRS})
|
2013-09-26 06:28:09 +05:30
|
|
|
|
2015-09-29 00:23:46 +05:30
|
|
|
target_link_libraries(unpack200 ${ZLIB_LIBRARIES})
|
2013-09-30 00:41:30 +05:30
|
|
|
|
2015-09-29 00:23:46 +05:30
|
|
|
if(PACK200_BUILD_BINARY)
|
|
|
|
add_executable(anti200 anti200.cpp)
|
|
|
|
target_link_libraries(anti200 unpack200)
|
|
|
|
endif()
|