summaryrefslogtreecommitdiff
path: root/recipes/build-tools
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2013-04-04 20:29:47 +0200
committerAndoni Morales Alastruey <ylatuya@gmail.com>2013-04-05 18:06:51 +0200
commit4bd6c75e6d2084b0f7cb185b8d8394d9240837f5 (patch)
tree7c97e5574bbcc838737d4492b6920bb8d23d77b4 /recipes/build-tools
parenta3d91b4897b460adb125c3fe9894bb92cda7f7e2 (diff)
cmake: fix build on windows x86_64
Diffstat (limited to 'recipes/build-tools')
-rw-r--r--recipes/build-tools/cmake.recipe17
1 files changed, 17 insertions, 0 deletions
diff --git a/recipes/build-tools/cmake.recipe b/recipes/build-tools/cmake.recipe
index acf17feb..ab42b8eb 100644
--- a/recipes/build-tools/cmake.recipe
+++ b/recipes/build-tools/cmake.recipe
@@ -16,3 +16,20 @@ class Recipe(recipe.Recipe):
can_use_configure_cache = False
files_bin = ['bin/cmake', 'bin/ccmake']
+
+ def prepare(self):
+ if self.config.target_platform == Platform.WINDOWS:
+ if self.config.target_arch == Architecture.X86_64:
+ # Setting SYSTEM_NAME sets CMAKE_CROSSCOMPILING and the
+ # binutils such as ar and ranlib are prefixed correctly
+ self.configure_tpl += ' -- -DCMAKE_SYSTEM_NAME="Windows"'
+
+ def configure(self):
+ if self.config.target_platform == Platform.WINDOWS:
+ if self.config.target_arch == Architecture.X86_64:
+ # Bootstrap needs to be run twice for some dark reason
+ try:
+ super(recipe.Recipe, self).configure()
+ except:
+ pass
+ super(recipe.Recipe, self).configure()