Improve crossbuild configuration
Use meson native features to detect crossbuild, and remove the user-provided option crossbuild_windows.
This commit is contained in:
parent
892cfe943e
commit
0685c491cd
3 changed files with 3 additions and 4 deletions
|
@ -82,7 +82,9 @@ endif
|
||||||
|
|
||||||
cc = meson.get_compiler('c')
|
cc = meson.get_compiler('c')
|
||||||
|
|
||||||
if not get_option('crossbuild_windows')
|
crossbuild_windows = meson.is_cross_build() and host_machine.system() == 'windows'
|
||||||
|
|
||||||
|
if not crossbuild_windows
|
||||||
|
|
||||||
# native build
|
# native build
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
option('compile_app', type: 'boolean', value: true, description: 'Build the client')
|
option('compile_app', type: 'boolean', value: true, description: 'Build the client')
|
||||||
option('compile_server', type: 'boolean', value: true, description: 'Build the server')
|
option('compile_server', type: 'boolean', value: true, description: 'Build the server')
|
||||||
option('crossbuild_windows', type: 'boolean', value: false, description: 'Build for Windows from Linux')
|
|
||||||
option('prebuilt_server', type: 'string', description: 'Path of the prebuilt server')
|
option('prebuilt_server', type: 'string', description: 'Path of the prebuilt server')
|
||||||
option('portable', type: 'boolean', value: false, description: 'Use scrcpy-server from the same directory as the scrcpy executable')
|
option('portable', type: 'boolean', value: false, description: 'Use scrcpy-server from the same directory as the scrcpy executable')
|
||||||
option('server_debugger', type: 'boolean', value: false, description: 'Run a server debugger and wait for a client to be attached')
|
option('server_debugger', type: 'boolean', value: false, description: 'Run a server debugger and wait for a client to be attached')
|
||||||
|
|
|
@ -70,7 +70,6 @@ build-win32: prepare-deps-win32
|
||||||
meson "$(WIN32_BUILD_DIR)" \
|
meson "$(WIN32_BUILD_DIR)" \
|
||||||
--cross-file cross_win32.txt \
|
--cross-file cross_win32.txt \
|
||||||
--buildtype release --strip -Db_lto=true \
|
--buildtype release --strip -Db_lto=true \
|
||||||
-Dcrossbuild_windows=true \
|
|
||||||
-Dcompile_server=false \
|
-Dcompile_server=false \
|
||||||
-Dportable=true )
|
-Dportable=true )
|
||||||
ninja -C "$(WIN32_BUILD_DIR)"
|
ninja -C "$(WIN32_BUILD_DIR)"
|
||||||
|
@ -83,7 +82,6 @@ build-win64: prepare-deps-win64
|
||||||
meson "$(WIN64_BUILD_DIR)" \
|
meson "$(WIN64_BUILD_DIR)" \
|
||||||
--cross-file cross_win64.txt \
|
--cross-file cross_win64.txt \
|
||||||
--buildtype release --strip -Db_lto=true \
|
--buildtype release --strip -Db_lto=true \
|
||||||
-Dcrossbuild_windows=true \
|
|
||||||
-Dcompile_server=false \
|
-Dcompile_server=false \
|
||||||
-Dportable=true )
|
-Dportable=true )
|
||||||
ninja -C "$(WIN64_BUILD_DIR)"
|
ninja -C "$(WIN64_BUILD_DIR)"
|
||||||
|
|
Loading…
Reference in a new issue