CMakeLists.txt 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. IF(NOT LMMS_SUPPORT_VST)
  2. RETURN()
  3. ENDIF()
  4. INCLUDE(BuildPlugin)
  5. INCLUDE(ExternalProject)
  6. # These variables are not meant to be used normally, except packaging
  7. SET(REMOTE_VST_PLUGIN_FILEPATH_32 "32/RemoteVstPlugin32" CACHE STRING "Relative file path to RemoteVstPlugin32")
  8. SET(REMOTE_VST_PLUGIN_FILEPATH_64 "RemoteVstPlugin64" CACHE STRING "Relative file path to RemoteVstPlugin64")
  9. ADD_SUBDIRECTORY(vstbase)
  10. SET(EXTERNALPROJECT_ARGS
  11. SOURCE_DIR "${CMAKE_CURRENT_LIST_DIR}/RemoteVstPlugin"
  12. #INSTALL_COMMAND ""
  13. BUILD_ALWAYS ON
  14. # Skip the install step.
  15. INSTALL_COMMAND ""
  16. )
  17. set(export_variables
  18. "LMMS_SOURCE_DIR"
  19. "LMMS_BINARY_DIR"
  20. "CMAKE_MODULE_PATH"
  21. "CMAKE_RUNTIME_OUTPUT_DIRECTORY"
  22. "CMAKE_BUILD_TYPE"
  23. "LMMS_BUILD_LINUX"
  24. "LMMS_BUILD_WIN32"
  25. "PLUGIN_DIR")
  26. SET(EXTERNALPROJECT_CMAKE_ARGS
  27. "-DBUILD_WITH_EXTERNALPROJECT=ON"
  28. )
  29. macro(_export_var_to_external var_name)
  30. list(APPEND EXTERNALPROJECT_CMAKE_ARGS "-D${var_name}=${${var_name}}")
  31. endmacro()
  32. foreach(var ${export_variables})
  33. _export_var_to_external(${var})
  34. endforeach()
  35. # build 32 bit version of RemoteVstPlugin
  36. IF(WANT_VST_32)
  37. INCLUDE("${CMAKE_CURRENT_LIST_DIR}/RemoteVstPlugin32.cmake")
  38. ENDIF()
  39. # build 64 bit version of RemoteVstPlugin
  40. IF(WANT_VST_64)
  41. INCLUDE("${CMAKE_CURRENT_LIST_DIR}/RemoteVstPlugin64.cmake")
  42. ENDIF()