Add flags for desktop linux 32/142832/1
authorYoungsoo Choi <kenshin.choi@samsung.com>
Sat, 5 Aug 2017 07:42:21 +0000 (07:42 +0000)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Mon, 7 Aug 2017 05:13:43 +0000 (05:13 +0000)
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 <kenshin.choi@samsung.com>
common.gypi
efl/build/build_desktop.sh
efl/build/common.sh
script/update.py
vendor/brightray/brightray.gypi

index 3c8aaf0..ac3f21c 100644 (file)
@@ -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',
index 5d56889..0888006 100755 (executable)
@@ -54,12 +54,7 @@ fi
 
 # bootstrap
 
-${TOPDIR}/script/bootstrap.py \
-    --define "use_efl=1 libchromiumcontent_component=1" \
-    --dev \
-    --disable_clang \
-    -v \
-    $@
+hostGypElectronEfl $@
 
 # build
 
index 25583ce..cf60c90 100644 (file)
@@ -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
+}
index f53dc4f..2a0df3b 100755 (executable)
@@ -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)
 
index 49037bf..f039d85 100644 (file)
           'DISABLE_NACL',
         ],
         'conditions': [
-          ['OS!="mac"', {
+          ['OS!="mac" and use_efl!=1', {
             'defines': [
               'TOOLKIT_VIEWS',
               'USE_AURA',
             ],
           }, {
             'conditions': [
+              ['desktop_linux==1', {
+                'defines': [
+                  'DESKTOP_LINUX',
+                ],
+              }],
               ['use_efl==1', {
                 'defines': [
                   'USE_EFL',