-
Notifications
You must be signed in to change notification settings - Fork 8
/
libpng.cmake
38 lines (31 loc) · 1.18 KB
/
libpng.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#
# Install libpng from source
#
if (NOT libpng_NAME)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
include (ExternalProject)
include (ExternalSource)
external_source (libpng
1.5.13
libpng-1.5.13.tar.gz
9c5a584d4eb5fe40d0f1bc2090112c65
http://sourceforge.net/projects/libpng/files/libpng15/older-releases/1.5.13
FORCE)
message ("Installing ${libpng_NAME} into ilastik build area: ${ILASTIK_DEPENDENCY_DIR} ...")
ExternalProject_Add(${libpng_NAME}
DEPENDS ${zlib_NAME} ${jpeg_NAME}
PREFIX ${ILASTIK_DEPENDENCY_DIR}
URL ${libpng_URL}
URL_MD5 ${libpng_MD5}
UPDATE_COMMAND ""
PATCH_COMMAND ""
CONFIGURE_COMMAND ${CMAKE_COMMAND} ${libpng_SRC_DIR}
-G ${CMAKE_GENERATOR}
-DZLIB_INCLUDE_DIR=${ILASTIK_DEPENDENCY_DIR}/include
-DZLIB_LIBRARY=${ILASTIK_DEPENDENCY_DIR}/lib/zlib.lib
-DCMAKE_INSTALL_PREFIX=${ILASTIK_DEPENDENCY_DIR}
BUILD_COMMAND devenv libpng.sln /build Release /project png15
INSTALL_COMMAND devenv libpng.sln /build Release /project INSTALL
)
set_target_properties(${libpng_NAME} PROPERTIES EXCLUDE_FROM_ALL ON)
endif (NOT libpng_NAME)