-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathCMakeLists.txt
68 lines (60 loc) · 1.43 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
cmake_minimum_required(VERSION 3.10.2)
project(biometric_converter)
set(CMAKE_C_FLAGS "-fPIC")
# path dependency libs
set(DEP_INCLUDE_DIR /usr/local/include)
set(DEP_LINK_DIR /usr/local/lib)
# path to install
set(INSTALL_INCLUDE_DIR /usr/local/include)
set(INSTALL_LINK_DIR /usr/local/lib)
set(INSTALL_BIN_DIR /usr/local/bin)
include_directories(${DEP_INCLUDE_DIR})
link_directories(${DEP_LINK_DIR})
# NBIS use openjp2
add_definitions(-D__NBIS_OPENJP2__=ON)
# fix stdin for openjp2
add_definitions(-DOPJ_STDINT_H=OFF)
add_library(converter SHARED lib/converter.c)
INSTALL(TARGETS converter LIBRARY DESTINATION ${INSTALL_LINK_DIR})
INSTALL(FILES include/converter.h DESTINATION ${INSTALL_INCLUDE_DIR})
target_link_libraries(converter PRIVATE
biomdi
fmr
mindtct
image
wsq
an2k
ihead
jpegl
jpegb
fet
cblas
ioutil
util
openjp2
png
z
m)
target_include_directories(converter PRIVATE include)
add_executable(convert bin/convert.c)
target_link_libraries(convert PRIVATE
converter
biomdi
fmr
mindtct
image
wsq
an2k
ihead
jpegl
jpegb
fet
cblas
ioutil
util
openjp2
png
z
m)
target_include_directories(convert PRIVATE include)
INSTALL(TARGETS convert RUNTIME DESTINATION ${INSTALL_BIN_DIR})