CMakeLists.txt 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. INCLUDE(BuildPlugin)
  2. INCLUDE_DIRECTORIES(resid)
  3. BUILD_PLUGIN(sid
  4. SidInstrument.cpp
  5. SidInstrument.h
  6. resid/envelope.h
  7. resid/extfilt.h
  8. resid/filter.h
  9. resid/pot.h
  10. resid/siddefs.h
  11. resid/sid.h
  12. resid/spline.h
  13. resid/voice.h
  14. resid/wave.h
  15. resid/envelope.cc
  16. resid/extfilt.cc
  17. resid/filter.cc
  18. resid/pot.cc
  19. resid/sid.cc
  20. resid/version.cc
  21. resid/voice.cc
  22. resid/wave6581_PS_.cc
  23. resid/wave6581_PST.cc
  24. resid/wave6581_P_T.cc
  25. resid/wave6581__ST.cc
  26. resid/wave8580_PS_.cc
  27. resid/wave8580_PST.cc
  28. resid/wave8580_P_T.cc
  29. resid/wave8580__ST.cc
  30. resid/wave.cc
  31. MOCFILES SidInstrument.h
  32. EMBEDDED_RESOURCES *.png)
  33. # Parse VERSION
  34. FILE(READ "resid/CMakeLists.txt" lines)
  35. STRING(REGEX MATCH "set\\(MAJOR_VER [A-Za-z0-9_]*\\)" MAJOR_RAW ${lines})
  36. STRING(REGEX MATCH "set\\(MINOR_VER [A-Za-z0-9_]*\\)" MINOR_RAW ${lines})
  37. STRING(REGEX MATCH "set\\(PATCH_VER [A-Za-z0-9_]*\\)" PATCH_RAW ${lines})
  38. SEPARATE_ARGUMENTS(MAJOR_RAW)
  39. SEPARATE_ARGUMENTS(MINOR_RAW)
  40. SEPARATE_ARGUMENTS(PATCH_RAW)
  41. LIST(GET MAJOR_RAW 1 MAJOR_RAW)
  42. LIST(GET MINOR_RAW 1 MINOR_RAW)
  43. LIST(GET PATCH_RAW 1 PATCH_RAW)
  44. STRING(REPLACE ")" "" MAJOR_VER "${MAJOR_RAW}")
  45. STRING(REPLACE ")" "" MINOR_VER "${MINOR_RAW}")
  46. STRING(REPLACE ")" "" PATCH_VER "${PATCH_RAW}")
  47. TARGET_COMPILE_DEFINITIONS(sid PRIVATE VERSION="${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}")