CMakeLists.txt 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. cmake_minimum_required (VERSION 3.9)
  2. project (alac)
  3. set(HEADERS
  4. codec/EndianPortable.h
  5. codec/aglib.h
  6. codec/ALACAudioTypes.h
  7. codec/ALACBitUtilities.h
  8. codec/ALACDecoder.h
  9. codec/ALACEncoder.h
  10. codec/dplib.h
  11. codec/matrixlib.h
  12. )
  13. set (SRCS
  14. codec/EndianPortable.c
  15. codec/ALACBitUtilities.c
  16. codec/ALACDecoder.cpp
  17. codec/ALACEncoder.cpp
  18. codec/ag_dec.c
  19. codec/ag_enc.c
  20. codec/dp_dec.c
  21. codec/dp_enc.c
  22. codec/matrix_dec.c
  23. codec/matrix_enc.c
  24. )
  25. set(EXE_SRCS
  26. convert-utility/main.cpp
  27. convert-utility/CAFFileALAC.cpp
  28. )
  29. if(MSVC)
  30. add_compile_options(/W4 -D_CRT_SECURE_NO_WARNINGS -DTARGET_OS_WIN32)
  31. endif()
  32. include_directories(. codec convert-utility)
  33. add_library(libalac ${SRCS})
  34. add_executable(alacconvert ${EXE_SRCS})
  35. target_link_libraries(alacconvert libalac)
  36. install(
  37. TARGETS libalac
  38. RUNTIME DESTINATION bin
  39. LIBRARY DESTINATION lib
  40. ARCHIVE DESTINATION lib
  41. )
  42. if(NOT DISABLE_INSTALL_TOOLS)
  43. install (
  44. TARGETS alacconvert
  45. RUNTIME DESTINATION tools/alac
  46. )
  47. endif()
  48. if(NOT DISABLE_INSTALL_HEADERS)
  49. install(FILES ${HEADERS} DESTINATION include/alac)
  50. endif()