-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from tmiw/ms-cross-compile
Add support for Windows cross-compilation.
- Loading branch information
Showing
6 changed files
with
140 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
set(CMAKE_SYSTEM_NAME Windows) | ||
set(CMAKE_SYSTEM_PROCESSOR aarch64) | ||
|
||
set(triple ${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32) | ||
|
||
set(CMAKE_C_COMPILER ${triple}-clang) | ||
set(CMAKE_C_COMPILER_TARGET ${triple}) | ||
set(CMAKE_CXX_COMPILER ${triple}-clang++) | ||
set(CMAKE_CXX_COMPILER_TARGET ${triple}) | ||
set(CMAKE_AR ${triple}-ar) | ||
set(CMAKE_RANLIB ${triple}-ranlib) | ||
set(CMAKE_RC_COMPILER ${triple}-windres) | ||
|
||
set(CMAKE_C_FLAGS "-Wno-unused-command-line-argument -gcodeview") | ||
set(CMAKE_CXX_FLAGS "-Wno-unused-command-line-argument -gcodeview") | ||
set(CMAKE_EXE_LINKER_FLAGS -Wl,--pdb=) | ||
|
||
# For make package use. | ||
set(CMAKE_OBJDUMP ${triple}-objdump) | ||
set(FREEDV_USING_LLVM_MINGW 1) | ||
|
||
# adjust the default behaviour of the FIND_XXX() commands: | ||
# search headers and libraries in the target environment, search | ||
# programs in the host environment | ||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) |
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,28 @@ | ||
set(CMAKE_SYSTEM_NAME Windows) | ||
set(CMAKE_SYSTEM_PROCESSOR i686) | ||
|
||
set(triple ${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32) | ||
|
||
set(CMAKE_C_COMPILER ${triple}-clang) | ||
set(CMAKE_C_COMPILER_TARGET ${triple}) | ||
set(CMAKE_CXX_COMPILER ${triple}-clang++) | ||
set(CMAKE_CXX_COMPILER_TARGET ${triple}) | ||
|
||
set(CMAKE_AR ${triple}-ar) | ||
set(CMAKE_RANLIB ${triple}-ranlib) | ||
set(CMAKE_RC_COMPILER ${triple}-windres) | ||
|
||
set(CMAKE_C_FLAGS "-Wno-unused-command-line-argument -gcodeview") | ||
set(CMAKE_CXX_FLAGS "-Wno-unused-command-line-argument -gcodeview") | ||
set(CMAKE_EXE_LINKER_FLAGS -Wl,--pdb=) | ||
|
||
# For make package use. | ||
set(CMAKE_OBJDUMP ${triple}-objdump) | ||
set(FREEDV_USING_LLVM_MINGW 1) | ||
|
||
# adjust the default behaviour of the FIND_XXX() commands: | ||
# search headers and libraries in the target environment, search | ||
# programs in the host environment | ||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) |
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,28 @@ | ||
set(CMAKE_SYSTEM_NAME Windows) | ||
set(CMAKE_SYSTEM_PROCESSOR x86_64) | ||
|
||
set(triple ${CMAKE_SYSTEM_PROCESSOR}-w64-mingw32) | ||
|
||
set(CMAKE_C_COMPILER ${triple}-clang) | ||
set(CMAKE_C_COMPILER_TARGET ${triple}) | ||
set(CMAKE_CXX_COMPILER ${triple}-clang++) | ||
set(CMAKE_CXX_COMPILER_TARGET ${triple}) | ||
|
||
set(CMAKE_AR ${triple}-ar) | ||
set(CMAKE_RANLIB ${triple}-ranlib) | ||
set(CMAKE_RC_COMPILER ${triple}-windres) | ||
|
||
set(CMAKE_C_FLAGS "-Wno-unused-command-line-argument -gcodeview") | ||
set(CMAKE_CXX_FLAGS "-Wno-unused-command-line-argument -gcodeview") | ||
set(CMAKE_EXE_LINKER_FLAGS -Wl,--pdb=) | ||
|
||
# For make package use. | ||
set(CMAKE_OBJDUMP ${triple}-objdump) | ||
set(FREEDV_USING_LLVM_MINGW 1) | ||
|
||
# adjust the default behaviour of the FIND_XXX() commands: | ||
# search headers and libraries in the target environment, search | ||
# programs in the host environment | ||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) | ||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) |
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