From: Youngsoo Choi Date: Sat, 5 Aug 2017 07:42:21 +0000 (+0000) Subject: Add flags for desktop linux X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F32%2F142832%2F1;p=platform%2Fframework%2Fweb%2Fcrosswalk-tizen.git Add flags for desktop linux This adds cflags for desktop linux * Usage in C/C++ #if defined(USE_EFL) // implementation here #endif * Usage in gyp if (desktop_linux) { // implementation here } Change-Id: I73fb49441fb6581bc87b0a5fba05b1ea6de8a46e Signed-off-by: Youngsoo Choi --- diff --git a/common.gypi b/common.gypi index 3c8aaf0..ac3f21c 100644 --- a/common.gypi +++ b/common.gypi @@ -23,6 +23,7 @@ 'openssl_fips': '', 'openssl_no_asm': 1, 'use_efl%': 0, + 'desktop_linux%': 0, 'use_openssl_def': 0, 'OPENSSL_PRODUCT': 'libopenssl.a', 'node_release_urlbase': 'https://atom.io/download/atom-shell', diff --git a/efl/build/build_desktop.sh b/efl/build/build_desktop.sh index 5d56889..0888006 100755 --- a/efl/build/build_desktop.sh +++ b/efl/build/build_desktop.sh @@ -54,12 +54,7 @@ fi # bootstrap -${TOPDIR}/script/bootstrap.py \ - --define "use_efl=1 libchromiumcontent_component=1" \ - --dev \ - --disable_clang \ - -v \ - $@ +hostGypElectronEfl $@ # build diff --git a/efl/build/common.sh b/efl/build/common.sh index 25583ce..cf60c90 100644 --- a/efl/build/common.sh +++ b/efl/build/common.sh @@ -20,3 +20,19 @@ function getHostArch() { function getPythonVersion() { echo $(python --version 2>&1 | sed -e 's/Python \([0-9]\+\.[0-9]\+\)\.[0-9]\+/\1/') } + +function hostGypElectronEfl() { + if [[ $SKIP_GYP != 1 ]]; then + local DEFINE_ARGS=" + desktop_linux=1 + libchromiumcontent_component=1 + use_efl=1 + " + ${TOPDIR}/script/bootstrap.py \ + --define "${DEFINE_ARGS}" \ + --dev \ + --disable_clang \ + -v \ + $@ + fi +} diff --git a/script/update.py b/script/update.py index f53dc4f..2a0df3b 100755 --- a/script/update.py +++ b/script/update.py @@ -95,6 +95,7 @@ def run_gyp(target_arch, component): if args.msvs: generator = 'msvs-ninja' + print "GYP defines ::: ", defines return subprocess.call([python, gyp, '-f', generator, '--depth', '.', 'electron.gyp', '-Icommon.gypi'] + defines, env=env) diff --git a/vendor/brightray/brightray.gypi b/vendor/brightray/brightray.gypi index 49037bf..f039d85 100644 --- a/vendor/brightray/brightray.gypi +++ b/vendor/brightray/brightray.gypi @@ -110,7 +110,7 @@ 'DISABLE_NACL', ], 'conditions': [ - ['OS!="mac"', { + ['OS!="mac" and use_efl!=1', { 'defines': [ 'TOOLKIT_VIEWS', 'USE_AURA', @@ -122,6 +122,11 @@ ], }, { 'conditions': [ + ['desktop_linux==1', { + 'defines': [ + 'DESKTOP_LINUX', + ], + }], ['use_efl==1', { 'defines': [ 'USE_EFL',