Allow switching VST embed method at compile time
This commit is contained in:
@@ -35,6 +35,13 @@ IF(LMMS_MINIMAL)
|
||||
SET(PLUGIN_LIST ${MINIMAL_LIST} ${PLUGIN_LIST})
|
||||
ENDIF()
|
||||
|
||||
OPTION(LMMS_EMBED_VST "Turn on to embed VSTs as subwindows. Turn off to open VSTs in separate windows." ON)
|
||||
OPTION(LMMS_EMBED_VST_X11 "Turn on to embed VSTs using the X11Embed protocol. Turn off to use Qt's own embedding, which may be broken with your Qt version." ON)
|
||||
|
||||
IF(NOT LMMS_EMBED_VST OR NOT LMMS_BUILD_LINUX)
|
||||
SET(LMMS_EMBED_VST_X11 OFF)
|
||||
ENDIF()
|
||||
|
||||
IF("${PLUGIN_LIST}" STREQUAL "")
|
||||
SET(PLUGIN_LIST
|
||||
${MINIMAL_LIST}
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
IF(LMMS_EMBED_VST)
|
||||
ADD_DEFINITIONS(-DLMMS_EMBED_VST)
|
||||
IF(LMMS_EMBED_VST_X11)
|
||||
ADD_DEFINITIONS(-DLMMS_EMBED_VST_X11)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
IF(LMMS_SUPPORT_VST)
|
||||
INCLUDE(BuildPlugin)
|
||||
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/../vst_base")
|
||||
|
||||
@@ -2,6 +2,16 @@ IF(LMMS_SUPPORT_VST)
|
||||
|
||||
INCLUDE(BuildPlugin)
|
||||
|
||||
IF(LMMS_EMBED_VST)
|
||||
SET(EMBED_FLAGS "-DLMMS_EMBED_VST")
|
||||
IF(LMMS_EMBED_VST_X11)
|
||||
LIST(APPEND EMBED_FLAGS "-DLMMS_EMBED_VST_X11")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
ADD_DEFINITIONS(${EMBED_FLAGS})
|
||||
|
||||
|
||||
IF(LMMS_BUILD_WIN32)
|
||||
ADD_DEFINITIONS(-DPTW32_STATIC_LIB)
|
||||
ADD_EXECUTABLE(RemoteVstPlugin "${CMAKE_CURRENT_SOURCE_DIR}/RemoteVstPlugin.cpp")
|
||||
@@ -49,6 +59,7 @@ ENDIF(LMMS_HOST_X86_64)
|
||||
SET(WINE_CXX_FLAGS "" CACHE STRING "Extra flags passed to wineg++")
|
||||
|
||||
STRING(REPLACE " " ";" WINE_BUILD_FLAGS ${CMAKE_CXX_FLAGS} " " ${CMAKE_EXE_LINKER_FLAGS} " " ${WINE_CXX_FLAGS})
|
||||
|
||||
ADD_CUSTOM_COMMAND(
|
||||
SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/RemoteVstPlugin.cpp"
|
||||
COMMAND ${WINE_CXX}
|
||||
@@ -62,6 +73,7 @@ ADD_CUSTOM_COMMAND(
|
||||
-std=c++0x
|
||||
-mwindows -lpthread ${EXTRA_FLAGS} -fno-omit-frame-pointer
|
||||
${WINE_BUILD_FLAGS}
|
||||
${EMBED_FLAGS}
|
||||
-o ../RemoteVstPlugin
|
||||
COMMAND sh -c "mv ../RemoteVstPlugin.exe ../RemoteVstPlugin || true"
|
||||
TARGET vstbase
|
||||
|
||||
Reference in New Issue
Block a user