forked from deepflare/bioseqdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
32 lines (25 loc) · 1.24 KB
/
CMakeLists.txt
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
cmake_minimum_required(VERSION 3.14)
project(bioseqdb LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
find_package(PostgreSQL REQUIRED COMPONENTS Server)
find_program(PG_CONFIG pg_config)
execute_process(COMMAND ${PG_CONFIG} --pkglibdir OUTPUT_VARIABLE PG_CONFIG_PKGLIBDIR OUTPUT_STRIP_TRAILING_WHITESPACE)
execute_process(COMMAND ${PG_CONFIG} --sharedir OUTPUT_VARIABLE PG_CONFIG_SHAREDIR OUTPUT_STRIP_TRAILING_WHITESPACE)
find_library(BWA_LIBRARIES bwa REQUIRED)
find_library(HTS_LIBRARIES hts REQUIRED)
add_library(bioseqdb SHARED
bioseqdb/bwa.cpp
bioseqdb/extension.cpp
bioseqdb/sequence.cpp
)
add_executable(bioseqdb-import
bioseqdb-import/main.cpp
)
target_include_directories(bioseqdb PRIVATE ${PostgreSQL_TYPE_INCLUDE_DIR})
target_link_libraries(bioseqdb PRIVATE ${HTS_LIBRARIES} ${BWA_LIBRARIES})
target_include_directories(bioseqdb-import PRIVATE ${PostgreSQL_INCLUDE_DIRS})
target_link_libraries(bioseqdb-import PRIVATE ${PostgreSQL_LIBRARIES})
install(TARGETS bioseqdb DESTINATION ${PG_CONFIG_PKGLIBDIR})
install(FILES bioseqdb/bioseqdb.control DESTINATION ${PG_CONFIG_SHAREDIR}/extension)
install(FILES bioseqdb/bioseqdb--0.0.0.sql DESTINATION ${PG_CONFIG_SHAREDIR}/extension)
install(TARGETS bioseqdb-import)