summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2014-02-05 13:57:37 +0100
committerAndoni Morales Alastruey <ylatuya@gmail.com>2014-02-05 14:01:57 +0100
commit5070540f4ebbd2525decdf8ef6612116b2159a9a (patch)
treefb7b368a9157f29abc499d94d765e78a14e784f3
parent296bf0c0ef0db6a46929130941072cf43f8f4f20 (diff)
cmake: set CC and CXX compiler variables for all platforms
https://bugzilla.gnome.org/show_bug.cgi?id=723641
-rw-r--r--cerbero/build/build.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/cerbero/build/build.py b/cerbero/build/build.py
index 09b2599e..1a8468dc 100644
--- a/cerbero/build/build.py
+++ b/cerbero/build/build.py
@@ -304,10 +304,7 @@ class CMake (MakefilesBase):
cxx = cxx.replace('ccache ', '')
if self.config.target_platform == Platform.WINDOWS:
- self.configure_options += ' -DCMAKE_C_COMPILER=%s '\
- ' -DCMAKE_CXX_COMPILER=%s '\
- ' -DCMAKE_SYSTEM_NAME=Windows '\
- % (cc, cxx)
+ self.configure_options += ' -DCMAKE_SYSTEM_NAME=Windows '
if self.config.platform == Platform.WINDOWS:
self.configure_options += ' -G\\"Unix Makefiles\\"'
@@ -317,6 +314,8 @@ class CMake (MakefilesBase):
sysroot = r.match(cflags).group(1)
self.configure_options += ' -DCMAKE_OSX_SYSROOT=%s' % sysroot
+ self.configure_options += ' -DCMAKE_C_COMPILER=%s ' % cc
+ self.configure_options += ' -DCMAKE_CXX_COMPILER=%s ' % cxx
self.configure_options += ' -DCMAKE_C_FLAGS="%s"' % cflags
self.configure_options += ' -DCMAKE_CXX_FLAGS="%s"' % cxxflags
self.configure_options += ' -DLIB_SUFFIX=%s ' % self.config.lib_suffix