forked from janelia-flyem/buildem
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfreetype2.cmake
40 lines (33 loc) · 1.2 KB
/
freetype2.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
#
# Install freetype2 from source
#
if (NOT freetype2_NAME)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
include (ExternalProject)
include (ExternalSource)
include (BuildSupport)
# TODO -- The download URL might only be valid for most recent release.
# Find better mirror that has steady download URL or cache it at janelia.
external_source (freetype2
2.4.10
freetype-2.4.10.tar.bz2
13286702e9390a91661f980608adaff1
http://downloads.sourceforge.net/project/freetype/freetype2/2.4.10)
message ("Installing ${freetype2_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")
ExternalProject_Add(${freetype2_NAME}
PREFIX ${BUILDEM_DIR}
URL ${freetype2_URL}
URL_MD5 ${freetype2_MD5}
UPDATE_COMMAND ""
PATCH_COMMAND ""
CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ./configure
--prefix=${BUILDEM_DIR}
--enable-shared
LDFLAGS=${BUILDEM_LDFLAGS}
CPPFLAGS=-I${BUILDEM_DIR}/include
BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE)
BUILD_IN_SOURCE 1
INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install
)
set_target_properties(${freetype_NAME} PROPERTIES EXCLUDE_FROM_ALL ON)
endif (NOT freetype2_NAME)