-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'msvc/vst-rebase' (LMMS#4421)
- Loading branch information
Showing
164 changed files
with
1,097 additions
and
516 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
|
||
macro(CHECK_CXX_PREPROCESSOR VAR DIRECTIVE) | ||
string(RANDOM DEFINED_KEY) | ||
string(RANDOM UNDEFINED_KEY) | ||
|
||
set(TMP_FILENAME "${CMAKE_CURRENT_BINARY_DIR}/CxxTmp/src.cpp") | ||
SET(SRC " | ||
#if ${DIRECTIVE} | ||
#error ${DEFINED_KEY} | ||
#else | ||
#error ${UNDEFINED_KEY} | ||
#endif | ||
") | ||
file(WRITE ${TMP_FILENAME} "${SRC}") | ||
try_compile(RESULT_VAR | ||
${CMAKE_CURRENT_BINARY_DIR} | ||
${TMP_FILENAME} | ||
OUTPUT_VARIABLE OUTPUT_VAR | ||
) | ||
|
||
if(OUTPUT_VAR MATCHES ${DEFINED_KEY}) | ||
set(${VAR} ON) | ||
elseif(OUTPUT_VAR MATCHES ${UNDEFINED_KEY}) | ||
set(${VAR} OFF) | ||
else() | ||
message(FATAL_ERROR "Can't determine if \"${DIRECTIVE}\" is true.") | ||
endif() | ||
endmacro() | ||
|
||
|
||
macro(CHECK_CXX_DEFINE VAR DEFINE) | ||
CHECK_CXX_PREPROCESSOR(${VAR} "defined(${DEFINE})") | ||
endmacro() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#!/bin/sh | ||
# Wrapper script for winegcc to remove .exe file ending automatically | ||
# appended by winebuild. | ||
# See FindWine.cmake for usage | ||
|
||
set -e | ||
|
||
args="$@" | ||
|
||
# Find output name, link mode and architecture | ||
while [ $# -gt 0 ]; do | ||
key="$1" | ||
|
||
case $key in | ||
-o) | ||
output=$2 | ||
shift | ||
;; | ||
-c) | ||
no_link=true | ||
;; | ||
-m32) | ||
win32=true | ||
;; | ||
*) | ||
|
||
;; | ||
esac | ||
|
||
shift | ||
done | ||
|
||
if [ -z "$output" ]; then | ||
# If -c is used without specifying an output name, GCC defaults to "a.out". | ||
if [ "$no_link" != true ]; then | ||
output="a.out" | ||
no_move=true | ||
fi | ||
fi | ||
|
||
# Some Wine distributions can't find their own headers. WINE_INCLUDE_DIR provided | ||
# by FindWine.cmake | ||
extra_args="-I@WINE_INCLUDE_DIR@" | ||
|
||
# Apply -m32 library fix if necessary | ||
if [ "$win32" = true ] && [ "$no_link" != true ]; then | ||
extra_args="$extra_args @WINE_32_FLAGS@" | ||
fi | ||
|
||
# Run winegcc | ||
export WINEBUILD=@WINE_BUILD@ | ||
@WINE_CXX@ $extra_args $args | ||
|
||
if [ "$no_move" = true ] || [ "$no_link" = true ]; then | ||
exit 0 | ||
fi | ||
|
||
if [ ! -e "$output.exe" ]; then | ||
echo "Fatal error in winegcc wrapper: No output file \"$output.exe\" found." | ||
exit 1 | ||
fi | ||
|
||
mv $output.exe $output |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
SET(CMAKE_TOOLCHAIN_FILE_32 "${CMAKE_CURRENT_LIST_DIR}/Ubuntu-MinGW-W64-32.cmake") | ||
|
||
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/common/Win64.cmake) | ||
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/common/Ubuntu-MinGW-W64.cmake) |
Oops, something went wrong.