mirror of
https://github.com/nigels-com/glew.git
synced 2025-02-18 06:31:02 +00:00
Building 32-bit binaries on 64-bit linux machines now supported.
This commit is contained in:
parent
ee3026486f
commit
0b396919e6
1
build/conan/.gitignore
vendored
1
build/conan/.gitignore
vendored
@ -15,3 +15,4 @@ test_package/build
|
|||||||
conanfile.pyc
|
conanfile.pyc
|
||||||
conaninfo.txt
|
conaninfo.txt
|
||||||
conanbuildinfo.cmake
|
conanbuildinfo.cmake
|
||||||
|
conanbuildinfo.txt
|
||||||
|
@ -4,9 +4,4 @@ import os, platform
|
|||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
builder = ConanMultiPackager(args="--build missing")
|
builder = ConanMultiPackager(args="--build missing")
|
||||||
builder.add_common_builds()
|
builder.add_common_builds()
|
||||||
filtered_builds = []
|
|
||||||
for settings, options, env_vars, build_requires in builder.builds:
|
|
||||||
if not (settings["arch"] == "x86"):
|
|
||||||
filtered_builds.append([settings, options, env_vars, build_requires])
|
|
||||||
builder.builds = filtered_builds
|
|
||||||
builder.run()
|
builder.run()
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
from conans import ConanFile, CMake
|
from conans import ConanFile, CMake
|
||||||
from conans.tools import os_info, SystemPackageTool, ConanException
|
from conans.tools import os_info, SystemPackageTool, ConanException, replace_in_file
|
||||||
from conans import tools, VisualStudioBuildEnvironment
|
from conans import tools, VisualStudioBuildEnvironment
|
||||||
from conans.tools import build_sln_command, vcvars_command, download, unzip
|
from conans.tools import build_sln_command, vcvars_command, download, unzip
|
||||||
|
|
||||||
@ -33,14 +33,20 @@ class GlewConan(ConanFile):
|
|||||||
installer.install("libxi-dev")
|
installer.install("libxi-dev")
|
||||||
installer.install("libgl-dev")
|
installer.install("libgl-dev")
|
||||||
installer.install("libosmesa-dev")
|
installer.install("libosmesa-dev")
|
||||||
installer.install("libglu1-mesa-dev")
|
if self.settings.arch == "x86" and tools.detected_architecture() == "x86_64":
|
||||||
|
installer.install("libglu1-mesa-dev:i386")
|
||||||
|
else:
|
||||||
|
installer.install("libglu1-mesa-dev")
|
||||||
elif os_info.with_yum:
|
elif os_info.with_yum:
|
||||||
installer = SystemPackageTool()
|
installer = SystemPackageTool()
|
||||||
if self.version == "master":
|
if self.version == "master":
|
||||||
installer.install("libXmu-devel")
|
installer.install("libXmu-devel")
|
||||||
installer.install("libXi-devel")
|
installer.install("libXi-devel")
|
||||||
installer.install("libGL-devel")
|
installer.install("libGL-devel")
|
||||||
installer.install("mesa-libGLU-devel")
|
if self.settings.arch == "x86" and tools.detected_architecture() == "x86_64":
|
||||||
|
installer.install("mesa-libGLU-devel.i686")
|
||||||
|
else:
|
||||||
|
installer.install("mesa-libGLU-devel")
|
||||||
else:
|
else:
|
||||||
self.output.warn("Could not determine Linux package manager, skipping system requirements installation.")
|
self.output.warn("Could not determine Linux package manager, skipping system requirements installation.")
|
||||||
|
|
||||||
@ -71,6 +77,12 @@ class GlewConan(ConanFile):
|
|||||||
if self.version == "master":
|
if self.version == "master":
|
||||||
self.run("make extensions")
|
self.run("make extensions")
|
||||||
|
|
||||||
|
replace_in_file("%s/build/cmake/CMakeLists.txt" % self.source_directory, "include(GNUInstallDirs)",
|
||||||
|
"""
|
||||||
|
include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
|
||||||
|
conan_basic_setup()
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
""")
|
||||||
cmake = CMake(self)
|
cmake = CMake(self)
|
||||||
cmake.configure(source_dir="%s/build/cmake" % self.source_directory, defs={"BUILD_UTILS": "OFF"})
|
cmake.configure(source_dir="%s/build/cmake" % self.source_directory, defs={"BUILD_UTILS": "OFF"})
|
||||||
cmake.build()
|
cmake.build()
|
||||||
|
@ -7,8 +7,8 @@ class TestGlew(ConanFile):
|
|||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
cmake = CMake(self)
|
cmake = CMake(self)
|
||||||
self.run('cmake "%s" %s' % (self.conanfile_directory, cmake.command_line))
|
cmake.configure()
|
||||||
self.run("cmake --build . %s" % cmake.build_config)
|
cmake.build()
|
||||||
|
|
||||||
def test(self):
|
def test(self):
|
||||||
self.run(os.sep.join([".","bin", "testGlew"]))
|
self.run(os.sep.join([".","bin", "testGlew"]))
|
||||||
|
Loading…
Reference in New Issue
Block a user