From 059ddc2875651509178043f185ec4a5fec14cb61 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Thu, 1 May 2014 23:55:19 +0200 Subject: [PATCH] CMake/FindWine: search for wineg++ executable Instead of relying on wineg++ being in PATH search for it as it might reside somewhere else. --- cmake/modules/FindWine.cmake | 1 + plugins/vst_base/CMakeLists.txt | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/modules/FindWine.cmake b/cmake/modules/FindWine.cmake index 520266ad8..a665a46e2 100644 --- a/cmake/modules/FindWine.cmake +++ b/cmake/modules/FindWine.cmake @@ -9,6 +9,7 @@ FIND_PATH(WINE_INCLUDE_DIR windows/windows.h PATH_SUFFIXES wine) FIND_LIBRARY(WINE_LIBRARY NAMES wine PATH_SUFFIXES wine) +FIND_PROGRAM(WINE_CXX NAMES wineg++) set(WINE_INCLUDE_DIRS ${WINE_INCLUDE_DIR} ) set(WINE_LIBRARIES ${WINE_LIBRARY} ) diff --git a/plugins/vst_base/CMakeLists.txt b/plugins/vst_base/CMakeLists.txt index a313ccdba..750ca9022 100644 --- a/plugins/vst_base/CMakeLists.txt +++ b/plugins/vst_base/CMakeLists.txt @@ -26,7 +26,7 @@ IF(LMMS_HOST_X86_64) SET(EXTRA_FLAGS -m32) # workaround for broken wineg++ in WINE 1.4 (shipped e.g. with Ubuntu Precise) - EXEC_PROGRAM( wineg++ ARGS "-v -m32 /dev/zero" OUTPUT_VARIABLE WINEBUILD_OUTPUT) + EXEC_PROGRAM( ${WINE_CXX} ARGS "-v -m32 /dev/zero" OUTPUT_VARIABLE WINEBUILD_OUTPUT) if("${WINEBUILD_OUTPUT}" MATCHES ".*x86_64-linux-gnu/wine/libwinecrt0.a.*") SET(EXTRA_FLAGS ${EXTRA_FLAGS} -nodefaultlibs /usr/lib/i386-linux-gnu/wine/libwinecrt0.a -luser32 -lkernel32 -lgdi32) ENDIF() @@ -34,7 +34,7 @@ ENDIF(LMMS_HOST_X86_64) ADD_CUSTOM_COMMAND( SOURCE "${CMAKE_CURRENT_SOURCE_DIR}/RemoteVstPlugin.cpp" - COMMAND wineg++ + COMMAND ${WINE_CXX} 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