summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-06-09 21:28:07 -0300
committerJuan Linietsky <reduzio@gmail.com>2016-06-09 21:28:07 -0300
commit94a6ff3d7a2ff770e32a68ac76771639e5a22665 (patch)
tree4d6c3fdf78c1ac63382c8c5198e952931e6a2556
parentd02261fc844b54ee5a1aa96ef675ee3b3c672744 (diff)
-make freetype build for all platforms the same, default as builtin except on x11.
closes #5119
-rw-r--r--SConstruct11
-rw-r--r--platform/osx/detect.py7
-rw-r--r--platform/windows/detect.py9
-rw-r--r--platform/x11/detect.py7
4 files changed, 12 insertions, 22 deletions
diff --git a/SConstruct b/SConstruct
index 0f9b046e2b..038d42f946 100644
--- a/SConstruct
+++ b/SConstruct
@@ -123,7 +123,7 @@ opts.Add('minizip','Build Minizip Archive Support: (yes/no)','yes')
opts.Add('squish','Squish BC Texture Compression in editor (yes/no)','yes')
opts.Add('theora','Theora Video (yes/no)','yes')
opts.Add('theoralib','Theora Video (yes/no)','no')
-opts.Add('freetype','Freetype support in editor','yes')
+opts.Add('freetype','Freetype support in editor','builtin')
opts.Add('speex','Speex Audio (yes/no)','yes')
opts.Add('xml','XML Save/Load support (yes/no)','yes')
opts.Add('png','PNG Image loader support (yes/no)','yes')
@@ -190,6 +190,7 @@ elif env_base['p'] != "":
env_base["platform"]=selected_platform
+
if selected_platform in platform_list:
sys.path.append("./platform/"+selected_platform)
@@ -246,6 +247,14 @@ if selected_platform in platform_list:
#must happen after the flags, so when flags are used by configure, stuff happens (ie, ssl on x11)
detect.configure(env)
+
+ if (env["freetype"]!="no"):
+ env.Append(CCFLAGS=['-DFREETYPE_ENABLED'])
+ if (env["freetype"]=="builtin"):
+ env.Append(CPPPATH=['#drivers/freetype'])
+ env.Append(CPPPATH=['#drivers/freetype/freetype/include'])
+
+
#env['platform_libsuffix'] = env['LIBSUFFIX']
suffix="."+selected_platform
diff --git a/platform/osx/detect.py b/platform/osx/detect.py
index d1aa54b71d..1982beb10e 100644
--- a/platform/osx/detect.py
+++ b/platform/osx/detect.py
@@ -30,7 +30,6 @@ def get_flags():
return [
('legacygl', 'yes'),
('builtin_zlib', 'no'),
- ('freetype','builtin'), #use builtin freetype
('glew', 'yes'),
]
@@ -56,12 +55,6 @@ def configure(env):
env.Append(CCFLAGS=['-g3', '-Wall','-DDEBUG_ENABLED','-DDEBUG_MEMORY_ENABLED'])
- if (env["freetype"]!="no"):
- env.Append(CCFLAGS=['-DFREETYPE_ENABLED'])
- env.Append(CPPPATH=['#drivers/freetype'])
- env.Append(CPPPATH=['#drivers/freetype/freetype/include'])
-
-
if (not os.environ.has_key("OSXCROSS_ROOT")):
#regular native build
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index a6a949a11a..320fb9d269 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -168,7 +168,6 @@ def get_opts():
def get_flags():
return [
- ('freetype','builtin'), #use builtin freetype
('glew','yes'),
('openssl','builtin'), #use builtin openssl
]
@@ -203,10 +202,6 @@ def configure(env):
env.Append(CPPPATH=['#platform/windows/include'])
env.Append(LIBPATH=['#platform/windows/lib'])
- if (env["freetype"]!="no"):
- env.Append(CCFLAGS=['/DFREETYPE_ENABLED'])
- env.Append(CPPPATH=['#drivers/freetype'])
- env.Append(CPPPATH=['#drivers/freetype/freetype/include'])
if (env["target"]=="release"):
@@ -350,10 +345,6 @@ def configure(env):
env.Append(CCFLAGS=['-g', '-Wall','-DDEBUG_ENABLED','-DDEBUG_MEMORY_ENABLED'])
- if (env["freetype"]!="no"):
- env.Append(CCFLAGS=['-DFREETYPE_ENABLED'])
- env.Append(CPPPATH=['#drivers/freetype'])
- env.Append(CPPPATH=['#drivers/freetype/freetype/include'])
env["CC"]=mingw_prefix+"gcc"
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index 2561e09b9a..0362756f7c 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -67,6 +67,8 @@ def get_flags():
('builtin_zlib', 'no'),
('glew', 'yes'),
("openssl", "yes"),
+ ('freetype','yes'), #use system freetype
+
#("theora","no"),
]
@@ -141,11 +143,6 @@ def configure(env):
env.ParseConfig('pkg-config freetype2 --cflags --libs')
- if (env["freetype"]!="no"):
- env.Append(CCFLAGS=['-DFREETYPE_ENABLED'])
- if (env["freetype"]=="builtin"):
- env.Append(CPPPATH=['#drivers/freetype'])
- env.Append(CPPPATH=['#drivers/freetype/freetype/include'])
env.Append(CPPFLAGS=['-DOPENGL_ENABLED'])