/src/CMakeLists.txt
https://code.google.com/ · CMake · 79 lines · 69 code · 5 blank · 5 comment · 4 complexity · f4bfb10c65187d8c61fe644ded681fc2 MD5 · raw file
- set(flvmeta_src
- amf.c
- amf.h
- avc.c
- avc.h
- check.c
- check.h
- dump.c
- dump.h
- dump_json.c
- dump_json.h
- dump_raw.c
- dump_raw.h
- dump_xml.c
- dump_xml.h
- dump_yaml.c
- dump_yaml.h
- flv.c
- flv.h
- flvmeta.c
- flvmeta.h
- info.c
- info.h
- json.c
- json.h
- types.c
- types.h
- update.c
- update.h
- util.c
- util.h
- ${CMAKE_BINARY_DIR}/config.h
- )
- # add support for getopt and gettext in windows
- if(WIN32)
- set(flvmeta_src
- ${flvmeta_src}
- compat/getopt1.c
- compat/getopt.c
- compat/getopt.h
- compat/gettext.h
- compat/win32_tmpfile.c
- compat/win32_tmpfile.h
- )
- include_directories(compat)
- endif(WIN32)
- # static build
- if(WIN32)
- add_definitions(-DYAML_DECLARE_STATIC)
- endif(WIN32)
- add_executable(flvmeta ${flvmeta_src})
- # libyaml
- if(FLVMETA_USE_SYSTEM_LIBYAML)
- # search for libyaml on the system, link with it
- find_package(LibYAML REQUIRED)
- include_directories(${LIBYAML_INCLUDE_DIR})
- target_link_libraries(flvmeta ${LIBYAML_LIBRARIES})
- else(FLVMETA_USE_SYSTEM_LIBYAML)
- # use bundled version of libyaml
- include_directories(libyaml)
- add_subdirectory(libyaml)
- target_link_libraries(flvmeta yaml)
- endif(FLVMETA_USE_SYSTEM_LIBYAML)
- if(WIN32)
- install(
- TARGETS flvmeta
- RUNTIME DESTINATION .
- )
- else(WIN32)
- install(
- TARGETS flvmeta
- RUNTIME DESTINATION bin
- )
- endif(WIN32)