-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add soil2 #6860
Add soil2 #6860
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Failure in build 5 (
Note: To save resources, CI tries to finish as soon as an error is found. For this reason you might find that not all the references have been launched or not all the configurations for a given reference. Also, take into account that we cannot guarantee the order of execution as it depends on CI workload and workers availability. |
# Visual Studio users: SOIL2 will need to be compiled as C++ source ( at least the file etc1_utils.c ), since VC compiler doesn't support C99 | ||
del self.settings.compiler.libcxx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The libcxx is there for the c++ runtime library.
gcc has libstdc++ and libstdc++11.
clang has libstdc++, libstdc++11 and clang++.
MSVC has no specific c++ runtime, only its general runtime (MT/MD/MTd/MDd)
if not tools.which("premake"): | ||
self.build_requires("premake/5.0.0-alpha14") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't depend on a locally installed version. It might be bugged and out-of-date.
if not tools.which("premake"): | |
self.build_requires("premake/5.0.0-alpha14") | |
self.build_requires("premake/5.0.0-alpha14") |
tools.get(**self.conan_data["sources"][self.version]) | ||
extracted_dir = "SOIL2-release-" + self.version | ||
os.rename(extracted_dir, self._source_subfolder) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
conan learned to do this in one method.
tools.get(**self.conan_data["sources"][self.version]) | |
extracted_dir = "SOIL2-release-" + self.version | |
os.rename(extracted_dir, self._source_subfolder) | |
tools.get(**self.conan_data["sources"][self.version], | |
destinations=self._source_subfolder, strip_root=True) |
|
||
def system_requirements(self): | ||
if self.settings.os == "Macos": | ||
self.run("brew install xquartz") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a big no-no.
As a package manager ourselves, we don't want to depend as little as possible on other package manager.
So please create a xquartz recipe which can be added as a requirement here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and why does it need xquartz?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested bincrafters recipe without xquartz and CI passed on macos, so this method can probably be simply removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Croydon do you remember why it was added in bincrafters/conan-soil2@0cbc7c6#diff-63f09721ade419d29886e8190ffa3c9c756baa9bef8802a7f2aeabf3b545164fR36 ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess for opengl, but it doesn't make sense.
build_type = "debug" | ||
|
||
msbuild = MSBuild(self) | ||
msbuild.build("SOIL2.sln", targets=["soil2-static-lib"], platforms={"x86": "Win32"}, build_type=build_type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The premake script also provides a soil2-shared-lib
target
|
||
def build(self): | ||
config = "debug" if self.settings.build_type == "Debug" else "release" | ||
architecture = "x86" if self.settings.arch == "x86" else "x86_64" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is also armv8 for Apple, raspberry pi, ...
If only intel architectures are supported, please add a check in a validate
method.
bin_path = os.path.join("bin", "test_package") | ||
img_path = os.path.join(self.source_folder, "img_test.png") | ||
self.run("%s %s" % (bin_path, img_path), run_environment=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bin_path = os.path.join("bin", "test_package") | |
img_path = os.path.join(self.source_folder, "img_test.png") | |
self.run("%s %s" % (bin_path, img_path), run_environment=True) | |
if not tools.cross_building(self): | |
bin_path = os.path.join("bin", "test_package") | |
img_path = os.path.join(self.source_folder, "img_test.png") | |
self.run("%s %s" % (bin_path, img_path), run_environment=True) |
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); | ||
glfwWindowHint(GLFW_RESIZABLE, GL_FALSE); | ||
|
||
GLFWwindow* window = glfwCreateWindow(800, 600, "OpenGL", NULL, NULL); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't this this will work on headless build machines.
import os | ||
|
||
|
||
class soil2Conan(ConanFile): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For my tools.get
suggestion.
import os | |
class soil2Conan(ConanFile): | |
import os | |
required_conan_version = ">=1.33.0" | |
class Soil2Conan(ConanFile): |
This recipe looks like bincrafters recipe. If it is based on it, then please mention that it is a port of https://github.com/bincrafters/conan-soil2 in the PR description. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This pull request has been automatically closed because it has not had recent activity. Thank you for your contributions. |
Specify library name and version: soil2/1.20
I want to add soil2 library because it's so useful for game development
conan-center hook activated.