From 0fa7fbde0f86c7d68e2633008a8456497e3024b3 Mon Sep 17 00:00:00 2001 From: Hyunjin Song Date: Tue, 22 May 2018 16:34:14 +0900 Subject: [PATCH] Fix MSYS2 build --- cmake/build_win32.sh | 2 +- cmake/toolchains/MSYS-32.cmake | 6 ++++-- cmake/toolchains/MSYS-64.cmake | 5 ++--- cmake/toolchains/common/MSYS.cmake | 5 ++++- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/cmake/build_win32.sh b/cmake/build_win32.sh index e647f7c09..6fbf5287b 100755 --- a/cmake/build_win32.sh +++ b/cmake/build_win32.sh @@ -25,7 +25,7 @@ if [ -z "$MSYSCON" ]; then TOOLCHAIN="$DIR/toolchains/Ubuntu-MinGW-W64-$ARCH.cmake" fi else - CMAKE_OPTS="$CMAKE_OPTS -DLMMS_BUILD_MSYS=1" + TOOLCHAIN="$DIR/toolchains/MSYS-$ARCH.cmake" fi export PATH=$MINGW/bin:$PATH diff --git a/cmake/toolchains/MSYS-32.cmake b/cmake/toolchains/MSYS-32.cmake index d016e3ffd..698dd5437 100644 --- a/cmake/toolchains/MSYS-32.cmake +++ b/cmake/toolchains/MSYS-32.cmake @@ -1,2 +1,4 @@ -INCLUDE(common/Win32) -SET(LMMS_BUILD_MSYS 1) +INCLUDE(${CMAKE_CURRENT_LIST_DIR}/common/MSYS.cmake) +INCLUDE(${CMAKE_CURRENT_LIST_DIR}/common/Win32.cmake) + +SET(MINGW_PREFIX /mingw32) \ No newline at end of file diff --git a/cmake/toolchains/MSYS-64.cmake b/cmake/toolchains/MSYS-64.cmake index bce085b2d..8becd51b3 100644 --- a/cmake/toolchains/MSYS-64.cmake +++ b/cmake/toolchains/MSYS-64.cmake @@ -1,6 +1,5 @@ -INCLUDE(MSYS-32) -INCLUDE(Win64) -SET(LMMS_BUILD_MSYS 1) +INCLUDE(${CMAKE_CURRENT_LIST_DIR}/common/MSYS.cmake) +INCLUDE(${CMAKE_CURRENT_LIST_DIR}/common/Win64.cmake) SET(MINGW_PREFIX /mingw64) SET(MINGW_PREFIX32 /mingw32) diff --git a/cmake/toolchains/common/MSYS.cmake b/cmake/toolchains/common/MSYS.cmake index d31f60e6d..dc295d670 100644 --- a/cmake/toolchains/common/MSYS.cmake +++ b/cmake/toolchains/common/MSYS.cmake @@ -2,6 +2,7 @@ SET(CMAKE_FIND_ROOT_PATH ${MINGW_PREFIX}) SET(CMAKE_INSTALL_PREFIX ${MINGW_PREFIX}) + # Windows msys mingw ships with a mostly-suitable preconfigured environment SET(STRIP ${MINGW_PREFIX}/bin/strip) SET(CMAKE_RC_COMPILER ${MINGW_PREFIX}/bin/windres) @@ -31,4 +32,6 @@ SET(QT_OVERRIDE_LIBRARIES IF(LMMS_BUILD_MSYS AND CMAKE_BUILD_TYPE STREQUAL "Debug") # Override Qt debug libraries with release versions SET(QT_LIBRARIES "${QT_OVERRIDE_LIBRARIES}") -ENDIF() \ No newline at end of file +ENDIF() + +SET(LMMS_BUILD_MSYS 1) \ No newline at end of file