CMakeLists.txt 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. cmake_minimum_required(VERSION 3.2)
  2. include(FindGSL) # This cmake module only exists in 3.2 and above
  3. add_library(sekai SHARED
  4. src/audioio.cpp
  5. src/midi.cpp
  6. src/common.cpp
  7. src/hzosc.cpp
  8. src/epr.cpp
  9. src/OLABuffer.cpp
  10. src/VoiceSampler.cpp
  11. src/VoiceDefESPEAK.cpp
  12. src/VoiceDefMBROLA.cpp
  13. src/Track.cpp
  14. src/UnisynIndex.cpp
  15. src/ControlTrack.cpp
  16. src/MBRSynth.cpp
  17. src/cheaptrick.cpp
  18. src/codec.cpp
  19. src/d4c.cpp
  20. src/dio.cpp
  21. src/fft.cpp
  22. src/harvest.cpp
  23. src/matlabfunctions.cpp
  24. src/stonemask.cpp
  25. src/synthesis.cpp
  26. src/synthesisrealtime.cpp
  27. )
  28. set(HEADERS
  29. src/sekai/midi.h
  30. src/sekai/mfcc.h
  31. src/sekai/SekaiContext.h
  32. src/sekai/VVDReader.h
  33. src/sekai/OLABuffer.h
  34. src/sekai/VoiceSampler.h
  35. src/sekai/VoiceDefESPEAK.h
  36. src/sekai/VoiceDefMBROLA.h
  37. src/sekai/vvd.h
  38. src/sekai/common.h
  39. src/sekai/hzosc.h
  40. src/sekai/epr.h
  41. src/sekai/Track.h
  42. src/sekai/UnisynIndex.h
  43. src/sekai/MBRSynth.h
  44. src/sekai/EventList.h
  45. src/sekai/ControlTrack.h
  46. src/sekai/SynthInterface.h
  47. )
  48. ADD_DEFINITIONS(-std=c++11)
  49. set(SEKAI_VERSION_MAJOR 0)
  50. set(SEKAI_VERSION_MINOR 5)
  51. set(SEKAI_VERSION_PATCH 0)
  52. set(SEKAI_VERSION_STRING ${SEKAI_VERSION_MAJOR}.${SEKAI_VERSION_MINOR}.${SEKAI_VERSION_PATCH})
  53. set_target_properties(sekai PROPERTIES VERSION ${SEKAI_VERSION_STRING}
  54. SOVERSION ${SEKAI_VERSION_MAJOR})
  55. target_link_libraries(sekai fftw3 jsoncpp boost_system boost_filesystem GSL::gsl)
  56. include(FindPkgConfig)
  57. pkg_check_modules (JSONCPP REQUIRED jsoncpp)
  58. include_directories(src ${JSONCPP_INCLUDEDIR})
  59. add_definitions ("-Wall")
  60. install(FILES ${HEADERS} DESTINATION include/sekai)
  61. EXECUTE_PROCESS(COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH OUTPUT_VARIABLE
  62. CMAKE_ARCH_TRIPLET OUTPUT_STRIP_TRAILING_WHITESPACE)
  63. add_executable(test_espeak test/test_espeak.cpp)
  64. target_link_libraries(test_espeak sekai sndfile jack GSL::gsl GSL::gslcblas pthread)
  65. add_executable(test_mbrola test/test_mbrola.cpp)
  66. target_link_libraries(test_mbrola sekai sndfile jack GSL::gsl GSL::gslcblas pthread)
  67. add_executable(test_unisyn test/test_unisyn.cpp)
  68. target_link_libraries(test_unisyn sekai sndfile jack GSL::gsl GSL::gslcblas pthread)
  69. add_executable(espeak-sg bin/espeak-sg.cpp)
  70. target_link_libraries(espeak-sg espeak-ng)
  71. add_executable(mbr-harvest bin/mbr-harvest.cpp)
  72. target_link_libraries(mbr-harvest sekai sndfile)
  73. add_executable(mbr-resynth bin/mbr-resynth.cpp)
  74. target_link_libraries(mbr-resynth sekai sndfile)
  75. add_executable(realtime_demo
  76. examples/realtime_demo/jack.cpp
  77. examples/realtime_demo/main.cpp
  78. examples/realtime_demo/synth.cpp
  79. )
  80. target_link_libraries(realtime_demo sekai pthread jack sndfile)
  81. install(TARGETS sekai espeak-sg #mbr-harvest mbr-resynth
  82. RUNTIME DESTINATION bin
  83. LIBRARY DESTINATION lib/${CMAKE_ARCH_TRIPLET}
  84. )