This repository has been archived by the owner on Jun 9, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
/
ilmbase.cmake
50 lines (41 loc) · 1.5 KB
/
ilmbase.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
47
48
49
50
#
# Install ilmbase from source
#
if (NOT ilmbase_NAME)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
include (ExternalProject)
include (ExternalSource)
include (BuildSupport)
include (PatchSupport)
include (zlib)
external_source (ilmbase
1.0.2
ilmbase-1.0.2.tar.gz
26c133ee8ca48e1196fbfb3ffe292ab4
http://download.savannah.nongnu.org/releases/openexr)
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(ilmbase_PATCH_COMMAND ${PATCH_EXE}
${ilmbase_SRC_DIR}/Imath/ImathMatrix.h ${PATCH_DIR}/ilmbase-1.patch
# Add extra patch for clang compatibility
${ilmbase_SRC_DIR}/configure ${PATCH_DIR}/ilmbase-clang.patch )
else()
set(ilmbase_PATCH_COMMAND ${PATCH_EXE}
${ilmbase_SRC_DIR}/Imath/ImathMatrix.h ${PATCH_DIR}/ilmbase-1.patch )
endif()
message ("Installing ${ilmbase_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")
ExternalProject_Add(${ilmbase_NAME}
DEPENDS ${zlib_NAME}
PREFIX ${BUILDEM_DIR}
URL ${ilmbase_URL}
URL_MD5 ${ilmbase_MD5}
UPDATE_COMMAND ""
PATCH_COMMAND ${ilmbase_PATCH_COMMAND}
CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${ilmbase_SRC_DIR}/configure
--prefix=${BUILDEM_DIR}
LDFLAGS=${BUILDEM_LDFLAGS}
CPPFLAGS=-I${BUILDEM_DIR}/include
BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE)
INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install
)
set_target_properties(${ilmbase_NAME} PROPERTIES EXCLUDE_FROM_ALL ON)
endif (NOT ilmbase_NAME)