Skip to content

Commit 0128daf

Browse files
authored
Merge pull request #3961 from Jojo-Schmitz/MinGW-64bit
Allow build with 64bit MinGW (from Qt 5.12)
2 parents 3be62c4 + e2019a3 commit 0128daf

File tree

7 files changed

+34
-9
lines changed

7 files changed

+34
-9
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ build.debug
99
build.qtc
1010
win32build
1111
win32install
12+
win64build
13+
win64install
1214
build.xcode
1315
applebuild
1416
/*.config

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,9 @@ else (APPLE)
206206
if (MINGW)
207207
# -mno-ms-bitfields see #22048
208208
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mno-ms-bitfields")
209-
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--large-address-aware")
209+
if (NOT BUILD_64)
210+
set(CMAKE_EXE_LINKER_FLAGS "-Wl,--large-address-aware")
211+
endif (NOT BUILD_64)
210212
else (MINGW)
211213
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
212214
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wextra -Woverloaded-virtual")

mscore/CMakeLists.txt

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -581,13 +581,25 @@ if (MINGW)
581581

582582
install( TARGETS mscore RUNTIME DESTINATION bin )
583583

584+
if (BUILD_64)
585+
install( FILES
586+
${MINGW_ROOT}/bin/libgcc_s_seh-1.dll
587+
DESTINATION bin)
588+
install( FILES
589+
${MINGW_ROOT}/lib/portaudio.dll RENAME libportaudio-x86_64-w64-mingw32.static.dll
590+
DESTINATION bin)
591+
else (BUILD_64)
592+
install( FILES
593+
${MINGW_ROOT}/bin/libgcc_s_dw2-1.dll
594+
${MINGW_ROOT}/lib/portaudio.dll
595+
DESTINATION bin)
596+
endif (BUILD_64)
597+
584598
install( FILES
585-
${MINGW_ROOT}/bin/libgcc_s_dw2-1.dll
586599
${MINGW_ROOT}/bin/libstdc++-6.dll
587600
${MINGW_ROOT}/bin/libwinpthread-1.dll
588601
${MINGW_ROOT}/lib/libogg.dll
589602
${MINGW_ROOT}/lib/libsndfile-1.dll
590-
${MINGW_ROOT}/lib/portaudio.dll
591603
${MINGW_ROOT}/opt/bin/libeay32.dll
592604
${MINGW_ROOT}/lib/libvorbis.dll
593605
${MINGW_ROOT}/lib/libvorbisfile.dll
@@ -866,11 +878,6 @@ else (MINGW)
866878
add_dependencies(mscore lrelease)
867879

868880
install( FILES
869-
# ${MINGW_ROOT}/bin/libgcc_s_dw2-1.dll
870-
# ${MINGW_ROOT}/bin/libstdc++-6.dll
871-
# ${MINGW_ROOT}/bin/libwinpthread-1.dll
872-
# ${MINGW_ROOT}/opt/bin/libeay32.dll
873-
# ${MINGW_ROOT}/opt/bin/ssleay32.dll
874881
${dll_ogg}
875882
${dll_lame}
876883
${dll_sndfile}

mscore/seq.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646

4747
#include "click.h"
4848

49+
#define OV_EXCLUDE_STATIC_CALLBACKS
4950
#include <vorbis/vorbisfile.h>
5051

5152
#ifdef USE_PORTMIDI

mscore/waveview.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "libmscore/audio.h"
1616
#include "libmscore/score.h"
1717

18+
#define OV_EXCLUDE_STATIC_CALLBACKS
1819
#include <vorbis/vorbisfile.h>
1920

2021
namespace Ms {

thirdparty/poppler/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,11 @@ if (APPLE)
137137
set ( POPPLER_COMPILE_FLAGS "-O2 -Wno-unknown-warning-option -Wno-write-strings -ansi -Wnon-virtual-dtor -Woverloaded-virtual -Wno-unused-private-field -Wno-return-stack-address -Wno-shift-negative-value -std=c++11")
138138
else (APPLE)
139139
if (MINGW)
140-
set (POPPLER_COMPILE_FLAGS "-O2 -Wall -Wextra -Wno-write-strings -ansi -Wnon-virtual-dtor -Woverloaded-virtual -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-but-set-variable -Wno-format -std=c++11")
140+
if (BUILD_64)
141+
set (POPPLER_COMPILE_FLAGS "-O2 -Wall -Wextra -Wno-write-strings -ansi -Wnon-virtual-dtor -Woverloaded-virtual -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-but-set-variable -Wno-format -Wno-shift-negative-value -Wno-stringop-overflow -std=c++11")
142+
else (BUILD_64)
143+
set (POPPLER_COMPILE_FLAGS "-O2 -Wall -Wextra -Wno-write-strings -ansi -Wnon-virtual-dtor -Woverloaded-virtual -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-but-set-variable -Wno-format -std=c++11")
144+
endif (BUILD_64)
141145
else (MINGW)
142146
if (NOT MSVC)
143147
set (POPPLER_COMPILE_FLAGS "-O2 -Wno-write-strings -ansi -Wnon-virtual-dtor -Woverloaded-virtual -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unused-but-set-variable -std=c++11")

thirdparty/portmidi/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ if (MSVC)
5252
set_target_properties( portmidi PROPERTIES
5353
COMPILE_FLAGS "/wd4028 /wd4057 /wd4100 /wd4133 /wd4189 /wd4206 /wd4244 /wd4267 /wd4311 /wd4312 /wd4456 /wd4706"
5454
)
55+
else (MSVC)
56+
if (MINGW)
57+
if (BUILD_64)
58+
set_target_properties( portmidi PROPERTIES
59+
COMPILE_FLAGS "-Wno-int-to-pointer-cast -Wno-pointer-to-int-cast -Wno-incompatible-pointer-types"
60+
)
61+
endif (BUILD_64)
62+
endif (MINGW)
5563
endif (MSVC)
5664

5765
include_directories(

0 commit comments

Comments
 (0)