Yabin Li
2023-11-07 702ec03ad89d5c62e97eed770a6882d6412f8d58
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
file(GLOB HEADER_FILES ../../include/fst/extensions/compress/*.h)
message(STATUS "${HEADER_FILES}")
 
add_library(fstcompressscript
  compress-script.cc
  ${HEADER_FILES}
 )
 
target_link_libraries(fstcompressscript
  fstscript
  fst
  ${ZLIBS}
)
set_target_properties(fstcompressscript PROPERTIES
  SOVERSION "${SOVERSION}"
)
install(TARGETS fstcompressscript
  LIBRARY DESTINATION lib
  ARCHIVE DESTINATION lib
  RUNTIME DESTINATION lib
 )
 
if(HAVE_BIN)
  add_executable(fstcompress
    fstcompress.cc)
 
  target_link_libraries(fstcompress
    fstcompressscript
    fstscript
    fst
    ${ZLIBS}
    ${CMAKE_DL_LIBS}
   )
 
  add_executable(fstrandmod
    fstrandmod.cc
  )
 
  target_link_libraries(fstrandmod
    fstcompressscript
    fstscript
    fst
    ${ZLIBS}
    ${CMAKE_DL_LIBS}
  )
 
  install(TARGETS fstcompress fstrandmod
            LIBRARY DESTINATION bin
            ARCHIVE DESTINATION bin
            RUNTIME DESTINATION bin
        )
endif(HAVE_BIN)