PageRenderTime 36ms CodeModel.GetById 29ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/src/CMakeLists.txt

https://code.google.com/
CMake | 79 lines | 69 code | 5 blank | 5 comment | 4 complexity | f4bfb10c65187d8c61fe644ded681fc2 MD5 | raw file
 1set(flvmeta_src
 2  amf.c
 3  amf.h
 4  avc.c
 5  avc.h
 6  check.c
 7  check.h
 8  dump.c
 9  dump.h
10  dump_json.c
11  dump_json.h
12  dump_raw.c
13  dump_raw.h
14  dump_xml.c
15  dump_xml.h
16  dump_yaml.c
17  dump_yaml.h
18  flv.c
19  flv.h
20  flvmeta.c
21  flvmeta.h
22  info.c
23  info.h
24  json.c
25  json.h
26  types.c
27  types.h
28  update.c
29  update.h
30  util.c
31  util.h
32  ${CMAKE_BINARY_DIR}/config.h
33)
34
35# add support for getopt and gettext in windows
36if(WIN32)
37  set(flvmeta_src
38    ${flvmeta_src}
39    compat/getopt1.c
40    compat/getopt.c
41    compat/getopt.h
42    compat/gettext.h
43    compat/win32_tmpfile.c
44    compat/win32_tmpfile.h
45  )
46  include_directories(compat)
47endif(WIN32)
48
49# static build
50if(WIN32)
51  add_definitions(-DYAML_DECLARE_STATIC)
52endif(WIN32)
53
54add_executable(flvmeta ${flvmeta_src})
55
56# libyaml
57if(FLVMETA_USE_SYSTEM_LIBYAML)
58  # search for libyaml on the system, link with it
59  find_package(LibYAML REQUIRED)
60  include_directories(${LIBYAML_INCLUDE_DIR})
61  target_link_libraries(flvmeta ${LIBYAML_LIBRARIES})
62else(FLVMETA_USE_SYSTEM_LIBYAML)
63  # use bundled version of libyaml
64  include_directories(libyaml)
65  add_subdirectory(libyaml)
66  target_link_libraries(flvmeta yaml)
67endif(FLVMETA_USE_SYSTEM_LIBYAML)
68
69if(WIN32)
70  install(
71    TARGETS flvmeta
72    RUNTIME DESTINATION .
73  )
74else(WIN32)
75  install(
76    TARGETS flvmeta
77    RUNTIME DESTINATION bin
78  )
79endif(WIN32)