-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy pathExternal_CppDB.cmake
More file actions
43 lines (39 loc) · 1.19 KB
/
External_CppDB.cmake
File metadata and controls
43 lines (39 loc) · 1.19 KB
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
# The CppDB external project
if(fletch_ENABLE_PostgreSQL)
set(_CppDB_ARGS_PostgreSQL -DPostgreSQL_ROOT=${PostgreSQL_ROOT})
list(APPEND _CppDB_DEPENDS PostgreSQL)
else()
find_package(PostgreSQL)
if(NOT PostgreSQL_FOUND)
message(STATUS "Unable to find a suitable PostgreSQL.")
else()
set(_CppDB_ARGS_PostgreSQL
-DPostgreSQL_INCLUDE_DIR=${PostgreSQL_INCLUDE_DIR}
-DPostgreSQL_TYPE_INCLUDE_DIR=${PostgreSQL_TYPE_INCLUDE_DIR}
-DPostgreSQL_LIBRARY=${PostgreSQL_LIBRARY}
)
endif()
endif()
ExternalProject_Add(CppDB
DEPENDS ${_CppDB_DEPENDS}
URL ${CppDB_url}
URL_MD5 ${CppDB_md5}
${COMMON_EP_ARGS}
${COMMON_CMAKE_EP_ARGS}
PATCH_COMMAND ${CMAKE_COMMAND}
-DCppDB_patch=${fletch_SOURCE_DIR}/Patches/CppDB
-DCppDB_source=${fletch_BUILD_PREFIX}/src/CppDB
-P ${fletch_SOURCE_DIR}/Patches/CppDB/Patch.cmake
CMAKE_ARGS
${COMMON_CMAKE_ARGS}
-DDISABLE_SQLITE:BOOL=ON
${_CppDB_ARGS_PostgreSQL}
)
set(CppDB_ROOT ${fletch_BUILD_INSTALL_PREFIX} CACHE PATH "" FORCE)
file(APPEND ${fletch_CONFIG_INPUT} "
########################################
# CppDB
########################################
set(CppDB_ROOT @CppDB_ROOT@)
set(fletch_ENABLED_CppDB TRUE)
")