forked from tensorflow/tensorflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
106 changed files
with
1,573 additions
and
503 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
include (ExternalProject) | ||
|
||
set(zlib_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/external/zlib_archive) | ||
set(ZLIB_URL https://github.com/madler/zlib) | ||
set(ZLIB_BUILD ${CMAKE_CURRENT_BINARY_DIR}/zlib/src/zlib) | ||
set(ZLIB_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/zlib/install) | ||
set(ZLIB_TAG 50893291621658f355bc5b4d450a8d06a563053d) | ||
|
||
if(WIN32) | ||
set(zlib_STATIC_LIBRARIES | ||
${CMAKE_CURRENT_BINARY_DIR}/zlib/install/lib/zlib.lib) | ||
else() | ||
set(zlib_STATIC_LIBRARIES | ||
${CMAKE_CURRENT_BINARY_DIR}/zlib/install/lib/libz.a) | ||
endif() | ||
|
||
set(ZLIB_HEADERS | ||
"${ZLIB_INSTALL}/include/zconf.h" | ||
"${ZLIB_INSTALL}/include/zlib.h" | ||
) | ||
|
||
ExternalProject_Add(zlib | ||
PREFIX zlib | ||
GIT_REPOSITORY ${ZLIB_URL} | ||
GIT_TAG ${ZLIB_TAG} | ||
INSTALL_DIR ${ZLIB_INSTALL} | ||
BUILD_IN_SOURCE 1 | ||
DOWNLOAD_DIR "${DOWNLOAD_LOCATION}" | ||
CMAKE_CACHE_ARGS | ||
-DCMAKE_BUILD_TYPE:STRING=Release | ||
-DCMAKE_INSTALL_PREFIX:STRING=${ZLIB_INSTALL} | ||
-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=ON | ||
) | ||
|
||
# put zlib includes in the directory where they are expected | ||
add_custom_target(zlib_create_destination_dir | ||
COMMAND ${CMAKE_COMMAND} -E make_directory ${zlib_INCLUDE_DIR} | ||
DEPENDS zlib) | ||
|
||
add_custom_target(zlib_copy_headers_to_destination | ||
DEPENDS zlib_create_destination_dir) | ||
|
||
foreach(header_file ${ZLIB_HEADERS}) | ||
add_custom_command(TARGET zlib_copy_headers_to_destination PRE_BUILD | ||
COMMAND ${CMAKE_COMMAND} -E copy ${header_file} ${zlib_INCLUDE_DIR}) | ||
endforeach() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.