forked from fblumenthal/buildem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
libpng.cmake
46 lines (35 loc) · 1.28 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
39
40
41
42
43
44
45
46
#
# Install libpng from source
#
if (NOT libpng_NAME)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
include (ExternalProject)
include (ExternalSource)
include (BuildSupport)
# Note: 'libpng-1.5 removed direct access to png_struct and png_info'.
external_source (libpng
1.5.13
libpng-1.5.13.tar.gz
9c5a584d4eb5fe40d0f1bc2090112c65
http://downloads.sourceforge.net/project/libpng/libpng15/1.5.13)
#external_source (libpng
# 1.4.12
# libpng-1.4.12.tar.gz
# 72e4447061af5b781cd4057c4d449d80
# http://downloads.sourceforge.net/project/libpng/libpng14/1.4.12)
message ("Installing ${libpng_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")
ExternalProject_Add(${libpng_NAME}
PREFIX ${BUILDEM_DIR}
URL ${libpng_URL}
URL_MD5 ${libpng_MD5}
UPDATE_COMMAND ""
PATCH_COMMAND ""
CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${libpng_SRC_DIR}
-DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR}
-DCMAKE_PREFIX_PATH=${BUILDEM_DIR}
-DCMAKE_CXX_FLAGS=${BUILDEM_ADDITIONAL_CXX_FLAGS}
BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE)
INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install
)
set_target_properties(${libpng_NAME} PROPERTIES EXCLUDE_FROM_ALL ON)
endif (NOT libpng_NAME)