mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-05 20:13:44 +02:00
windows 32bit builds
This commit is contained in:
parent
6ea60bc429
commit
ea5bb43cf9
2 changed files with 19 additions and 2 deletions
|
@ -70,6 +70,17 @@ if(WIN32)
|
|||
-trimpath
|
||||
)
|
||||
|
||||
option(BUILD_32BIT "Force building as 32-bit binary" OFF)
|
||||
|
||||
if(BUILD_32BIT)
|
||||
set(CMAKE_SYSTEM_PROCESSOR "x86" CACHE STRING "system processor")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32" CACHE STRING "c++ flags")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32" CACHE STRING "c flags")
|
||||
set(GOARCH "GOARCH=386" CACHE STRING "go architecture")
|
||||
add_compile_options(
|
||||
-m32
|
||||
)
|
||||
endif(BUILD_32BIT)
|
||||
else(WIN32)
|
||||
|
||||
set(GOFLAGS
|
||||
|
|
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
|
@ -55,16 +55,22 @@ def buildMacOS() {
|
|||
|
||||
def buildWindows() {
|
||||
def tasks = [:]
|
||||
tasks << getTasks(['windows'], ['amd64'], { unused1, unused2 ->
|
||||
tasks << getTasks(['windows'], ['amd64', 'i386'], { unused1, platform ->
|
||||
def myNode = {
|
||||
node ('windows') {
|
||||
env.SHELL = 'C:/Windows/System32/cmd.exe'
|
||||
env.PATH = 'C:\\TDM-GCC-64\\bin;C:\\WINDOWS;C:\\Windows\\system32;C:\\CMake\\bin;C:\\Go\\bin'
|
||||
dir ("build") {
|
||||
checkout scm
|
||||
|
||||
|
||||
dir ("build") {
|
||||
def cmakeFlags = ""
|
||||
if (platform == "i386") {
|
||||
cmakeFlags = '-DBUILD_32BIT=1'
|
||||
}
|
||||
bat """
|
||||
cmake -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release ..
|
||||
cmake -G"MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release ${cmakeFlags} ..
|
||||
mingw32-make
|
||||
"""
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue