IF(LMMS_SUPPORT_VST) INCLUDE(BuildPlugin) IF(LMMS_BUILD_WIN32) ADD_DEFINITIONS(-DPTW32_STATIC_LIB) LINK_LIBRARIES(-lQtCore4 -lpthread -lgdi32 -lws2_32) ADD_EXECUTABLE(RemoteVstPlugin ${CMAKE_CURRENT_SOURCE_DIR}/RemoteVstPlugin.cpp) ADD_CUSTOM_COMMAND(TARGET RemoteVstPlugin POST_BUILD COMMAND ${STRIP} ${CMAKE_CURRENT_BINARY_DIR}/RemoteVstPlugin.exe) INSTALL(TARGETS RemoteVstPlugin RUNTIME DESTINATION ${PLUGIN_DIR}) IF(LMMS_BUILD_WIN64) # build 32 bit version of RemoteVstPlugin for Win64 so we can load # 32 bit VST plugins ADD_SUBDIRECTORY(Win64) ENDIF(LMMS_BUILD_WIN64) ENDIF(LMMS_BUILD_WIN32) BUILD_PLUGIN(vstbase vst_base.cpp VstPlugin.cpp VstPlugin.h communication.h MOCFILES VstPlugin.h) IF(LMMS_BUILD_LINUX AND NOT WANT_VST_NOWINE) IF(LMMS_HOST_X86_64) SET(EXTRA_FLAGS -m32) ENDIF(LMMS_HOST_X86_64) ADD_CUSTOM_COMMAND( SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/RemoteVstPlugin.cpp 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 OUTPUTS RemoteVstPlugin ) SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES RemoteVstPlugin.exe.so) INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/RemoteVstPlugin ${CMAKE_CURRENT_BINARY_DIR}/RemoteVstPlugin.exe.so DESTINATION ${PLUGIN_DIR}) ENDIF(LMMS_BUILD_LINUX AND NOT WANT_VST_NOWINE) ENDIF(LMMS_SUPPORT_VST)