|
1
|
cmake_minimum_required(VERSION 3.12...3.31) |
|
2
|
|
|
3
|
project( |
|
4
|
blast_find_package |
|
5
|
LANGUAGES C |
|
6
|
VERSION @blast_VERSION@) |
|
7
|
|
|
8
|
option(ZLIB_BLAST_BUILD_SHARED "" @ZLIB_BLAST_BUILD_SHARED@) |
|
9
|
option(ZLIB_BLAST_BUILD_STATIC "" @ZLIB_BLAST_BUILD_STATIC@) |
|
10
|
|
|
11
|
set(BLAST_SRCS |
|
12
|
@blast_SOURCE_DIR@/blast-test.c) |
|
13
|
|
|
14
|
if(ZLIB_BLAST_BUILD_SHARED) |
|
15
|
find_package(blast REQUIRED COMPONENTS shared CONFIG) |
|
16
|
add_executable(test_example ${BLAST_SRCS}) |
|
17
|
target_link_libraries(test_example BLAST::BLAST) |
|
18
|
endif(ZLIB_BLAST_BUILD_SHARED) |
|
19
|
|
|
20
|
if(ZLIB_BLAST_BUILD_STATIC) |
|
21
|
find_package(blast REQUIRED COMPONENTS static CONFIG) |
|
22
|
add_executable(test_example_static ${BLAST_SRCS}) |
|
23
|
target_link_libraries(test_example_static BLAST::BLASTSTATIC) |
|
24
|
endif(ZLIB_BLAST_BUILD_STATIC) |
|
25
|
|