aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/contrib/cmake/external/png.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/contrib/cmake/external/png.cmake')
-rw-r--r--tensorflow/contrib/cmake/external/png.cmake13
1 files changed, 9 insertions, 4 deletions
diff --git a/tensorflow/contrib/cmake/external/png.cmake b/tensorflow/contrib/cmake/external/png.cmake
index 56d6ae7050..2be5aa70af 100644
--- a/tensorflow/contrib/cmake/external/png.cmake
+++ b/tensorflow/contrib/cmake/external/png.cmake
@@ -5,7 +5,12 @@ set(png_URL https://storage.googleapis.com/libpng-public-archive/libpng-1.2.53.t
set(png_HASH SHA256=e05c9056d7f323088fd7824d8c6acc03a4a758c4b4916715924edc5dd3223a72)
set(png_BUILD ${CMAKE_BINARY_DIR}/png/src/png)
set(png_INSTALL ${CMAKE_BINARY_DIR}/png/install)
-set(png_STATIC_LIBRARIES ${CMAKE_BINARY_DIR}/png/install/lib/libpng12.a)
+
+if(WIN32)
+ set(png_STATIC_LIBRARIES ${CMAKE_BINARY_DIR}/png/install/lib/libpng12_static.lib)
+else()
+ set(png_STATIC_LIBRARIES ${CMAKE_BINARY_DIR}/png/install/lib/libpng12.a)
+endif()
set(png_HEADERS
"${png_INSTALL}/include/libpng12/png.h"
@@ -27,13 +32,13 @@ ExternalProject_Add(png
## put png includes in the directory where they are expected
add_custom_target(png_create_destination_dir
- COMMAND ${CMAKE_COMMAND} -E make_directory ${png_INCLUDE_DIR}/libpng-1.2.53
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${png_INCLUDE_DIR}
DEPENDS png)
add_custom_target(png_copy_headers_to_destination
DEPENDS png_create_destination_dir)
foreach(header_file ${png_HEADERS})
- add_custom_command(TARGET png_copy_headers_to_destination PRE_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy ${header_file} ${png_INCLUDE_DIR}/libpng-1.2.53)
+ add_custom_command(TARGET png_copy_headers_to_destination PRE_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy ${header_file} ${png_INCLUDE_DIR}/)
endforeach()