forked from fblumenthal/buildem
-
Notifications
You must be signed in to change notification settings - Fork 0
/
libdvidcpp.cmake
43 lines (35 loc) · 1.33 KB
/
libdvidcpp.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
#
# Install libdvidcpp library from source
#
if (NOT libdvidcpp_NAME)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
include (ExternalProject)
include (ExternalSource)
include (BuildSupport)
include (cppnetlib)
external_git_repo (libdvidcpp
HEAD
http://github.com/janelia-flyem/libdvidcpp)
# set libs and include
set (LIBDVIDCPP_LIBRARIES ${BUILDEM_DIR}/lib/libdvidcpp.a)
set (LIBDVIDCPP_INCLUDE_DIRS ${BUILDEM_DIR}/include/libdvid)
message ("Installing ${libdvidcpp_NAME} into FlyEM build area: ${BUILDEM_DIR} ...")
ExternalProject_Add(${libdvidcpp_NAME}
DEPENDS ${cppnetlib_NAME}
PREFIX ${BUILDEM_DIR}
GIT_REPOSITORY ${libdvidcpp_URL}
UPDATE_COMMAND ""
PATCH_COMMAND ""
LIST_SEPARATOR ^^
CONFIGURE_COMMAND ${BUILDEM_ENV_STRING} ${CMAKE_COMMAND} ${libdvidcpp_SRC_DIR}
-DCMAKE_INSTALL_PREFIX=${BUILDEM_DIR}
-DCMAKE_PREFIX_PATH=${BUILDEM_DIR}
-DCMAKE_EXE_LINKER_FLAGS=${BUILDEM_LDFLAGS}
-DDEPENDENCY_SEARCH_PREFIX=${BUILDEM_DIR}
-DCMAKE_CXX_FLAGS_RELEASE=-O3
-DCMAKE_CXX_FLAGS_DEBUG="${CMAKE_CXX_FLAGS_DEBUG}"
BUILD_COMMAND ${BUILDEM_ENV_STRING} $(MAKE)
INSTALL_COMMAND ${BUILDEM_ENV_STRING} $(MAKE) install
)
set_target_properties(${libdvidcpp_NAME} PROPERTIES EXCLUDE_FROM_ALL ON)
endif (NOT libdvidcpp_NAME)