Skip to content

Commit

Permalink
VstBase: build as shared library explicitely
Browse files Browse the repository at this point in the history
  • Loading branch information
tobydox committed Apr 9, 2014
1 parent f824b87 commit be7a82b
Show file tree
Hide file tree
Showing 11 changed files with 31 additions and 9 deletions.
2 changes: 1 addition & 1 deletion plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ ADD_SUBDIRECTORY(stereo_matrix)
ADD_SUBDIRECTORY(stk)
ADD_SUBDIRECTORY(triple_oscillator)
ADD_SUBDIRECTORY(vestige)
ADD_SUBDIRECTORY(vst_base)
ADD_SUBDIRECTORY(VstBase)
ADD_SUBDIRECTORY(VstEffect)
ADD_SUBDIRECTORY(waveshaper)
ADD_SUBDIRECTORY(vibed)
Expand Down
26 changes: 24 additions & 2 deletions plugins/vst_base/CMakeLists.txt → plugins/VstBase/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,29 @@ IF(LMMS_BUILD_WIN32)
ENDIF(LMMS_BUILD_WIN64)
ENDIF(LMMS_BUILD_WIN32)

BUILD_PLUGIN(vstbase vst_base.cpp VstPlugin.cpp VstPlugin.h communication.h MOCFILES VstPlugin.h)

QT4_WRAP_CPP(VstBase_MOC_out VstPlugin.h)
ADD_FILE_DEPENDENCIES(VstPlugin.cpp ${VstBase_MOC_out})

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/include)
ADD_DEFINITIONS(-DPLUGIN_NAME="VstBase")

IF(LMMS_BUILD_APPLE)
LINK_DIRECTORIES(${CMAKE_BINARY_DIR})
LINK_LIBRARIES(${QT_LIBRARIES})
ENDIF(LMMS_BUILD_APPLE)
IF(LMMS_BUILD_WIN32)
LINK_DIRECTORIES(${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR})
LINK_LIBRARIES(-llmms ${QT_LIBRARIES})
ENDIF(LMMS_BUILD_WIN32)

ADD_LIBRARY(VstBase SHARED VstPlugin.cpp VstPlugin.h)
INSTALL(TARGETS VstBase DESTINATION "${PLUGIN_DIR}")

IF(LMMS_BUILD_WIN32)
SET_TARGET_PROPERTIES(VstBase PROPERTIES PREFIX "")
ADD_CUSTOM_COMMAND(TARGET VstBase POST_BUILD COMMAND ${STRIP} ${CMAKE_CURRENT_BINARY_DIR}/VstBase.dll)
ENDIF(LMMS_BUILD_WIN32)


IF(LMMS_BUILD_LINUX AND NOT WANT_VST_NOWINE)
Expand All @@ -37,7 +59,7 @@ ADD_CUSTOM_COMMAND(
COMMAND wineg++
ARGS "-I\"${CMAKE_BINARY_DIR}\"" "-I\"${CMAKE_SOURCE_DIR}/include\"" "-I\"${CMAKE_INSTALL_PREFIX}/include/wine/windows\"" "-I\"${CMAKE_INSTALL_PREFIX}/include\"" -I/usr/include/wine/windows "\"${CMAKE_CURRENT_SOURCE_DIR}/RemoteVstPlugin.cpp\"" -mwindows -lpthread ${EXTRA_FLAGS} -o RemoteVstPlugin
COMMAND find -name RemoteVstPlugin.exe -exec mv "'{}'" RemoteVstPlugin "';'"
TARGET vstbase
TARGET VstBase
OUTPUTS RemoteVstPlugin
)

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions plugins/VstEffect/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
IF(LMMS_SUPPORT_VST)
INCLUDE(BuildPlugin)
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/../vst_base")
LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/../vst_base")
LINK_LIBRARIES(vstbase)
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/../VstBase")
LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/../VstBase")
LINK_LIBRARIES(VstBase)
BUILD_PLUGIN(vsteffect VstEffect.cpp VstEffectControls.cpp VstEffectControlDialog.cpp VstSubPluginFeatures.cpp VstEffect.h VstEffectControls.h VstEffectControlDialog.h VstSubPluginFeatures.h MOCFILES VstEffectControls.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")
SET_TARGET_PROPERTIES(vsteffect PROPERTIES COMPILE_FLAGS "-Wno-attributes")

Expand Down
6 changes: 3 additions & 3 deletions plugins/vestige/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
IF(LMMS_SUPPORT_VST)
INCLUDE(BuildPlugin)
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/../vst_base")
LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/../vst_base")
LINK_LIBRARIES(vstbase)
INCLUDE_DIRECTORIES("${CMAKE_CURRENT_SOURCE_DIR}/../VstBase")
LINK_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/../VstBase")
LINK_LIBRARIES(VstBase)
BUILD_PLUGIN(vestige vestige.cpp vestige.h MOCFILES vestige.h EMBEDDED_RESOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.png")
ENDIF(LMMS_SUPPORT_VST)

0 comments on commit be7a82b

Please sign in to comment.