Skip to content

Commit

Permalink
Add comments describing zlib's build and packaging (#1106).
Browse files Browse the repository at this point in the history
  • Loading branch information
dbrnz committed Nov 28, 2016
1 parent 2cf499a commit 5378f67
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/plugins/thirdParty/zlib/CMakeLists.txt
@@ -1,10 +1,13 @@
PROJECT(zlibPlugin)

# Specify the version of zlib we want to build

SET(ZLIB_FULL_VERSION "1.2.8")
SET(ZLIB_SHORT_VERSION "1")

SET(ZLIB_GIT_TAG v${ZLIB_FULL_VERSION})

# The names of the libraries built by zlib's build process

IF(WIN32)
IF(RELEASE_MODE)
Expand All @@ -23,9 +26,13 @@ ELSE()
ENDIF()
SET(EXTERNAL_BINARIES ${ZLIB_LIBRARY})

# Specify where our local zlib will be installed

SET(RELATIVE_INSTALL_DIR external/${REMOTE_EXTERNAL_BINARIES_DIR})
SET(FULL_INSTALL_DIR ${PROJECT_SOURCE_DIR}/${RELATIVE_INSTALL_DIR})

# Specify the files that will have their SHA1 checked when packaged

SET(CHECKED_FILES lib/${ZLIB_LIBRARY})
IF(WIN32)
LIST(APPEND CHECKED_FILES lib/${ZLIB_GENERATED_LIBRARY})
Expand Down Expand Up @@ -78,6 +85,8 @@ ELSE()
SET(ZLIB_C_FLAGS "${CMAKE_C_FLAGS} /wd4996")
ENDIF()

# Build zlib as an external project

ExternalProject_Add(
zlibBuild
SOURCE_DIR ${PROJECT_SOURCE_DIR}/zlib
Expand Down Expand Up @@ -151,6 +160,8 @@ ADD_PLUGIN(zlib
${EXTERNAL_BINARIES}
)

# We depend on zlib being built if we are not using the prebuilt version

IF(NOT USE_PREBUILT_ZLIB_PLUGIN)
ADD_DEPENDENCIES(zlibPlugin zlibBuild)
ENDIF()

0 comments on commit 5378f67

Please sign in to comment.