forked from fblumenthal/buildem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ann.cmake
46 lines (35 loc) · 1.29 KB
/
ann.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
#
# Install ann from source
#
if (NOT ann_NAME)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
include (ExternalProject)
include (ExternalSource)
include (BuildSupport)
include (PatchSupport)
external_source (ann
1.1.2
ann_1.1.2.tar.gz
7ffaacc7ea79ca39d4958a6378071365
http://www.cs.umd.edu/~mount/ANN/Files/1.1.2
FORCE)
message ("Installing ${ann_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")
ExternalProject_Add(${ann_NAME}
PREFIX ${BUILDEM_DIR}
URL ${ann_URL}
URL_MD5 ${ann_MD5}
UPDATE_COMMAND ""
PATCH_COMMAND ${BUILDEM_ENV_STRING} cp ${PATCH_DIR}/ann.patch ${ann_SRC_DIR}/CMakeLists.txt
#${BUILDEM_ENV_STRING} ${PATCH_EXE}
#${ann_SRC_DIR}/CMakeLists.txt ${PATCH_DIR}/ann.patch
CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${ann_SRC_DIR}
-DBUILD_SHARED_LIBS=ON
-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
TEST_COMMAND "" # ${BUILDEM_ENV_STRING} $(MAKE) check
)
set_target_properties(${ann_NAME} PROPERTIES EXCLUDE_FROM_ALL ON)
endif (NOT ann_NAME)