Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from conans import ConanFile, CMake, tools
- from conans.client.tools import settings
- import os, sys
- sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))))
- from help_config import *
- class ImplotConan(ConanFile):
- name = "implot"
- version = "0.9"
- license = "MIT"
- author = "Evan Pezent"
- description = "Advanced 2D Plotting for Dear ImGui"
- settings = "os", "compiler", "build_type", "arch"
- options = {"shared": [True, False], "fPIC": [True, False]}
- default_options = {"shared": False, "fPIC": True}
- requires = "imgui/1.83"
- exports_sources = "src/*"
- generators = "cmake"
- def config_options(self):
- if self.settings.os == "Windows":
- del self.options.fPIC
- def source(self):
- self.run("git clone https://github.com/epezent/implot src/implot")
- self.run("cd src/implot && git checkout tags/v0.9")
- def build(self):
- cmake = CMake(self)
- cmake.configure(args = "-DBUILD_SHARED=" + ("ON" if libraries_type == "shared" else "ON"), source_folder="src")
- cmake.build()
- def package(self):
- self.copy("*.hpp", dst="include", src="src")
- self.copy("*.lib", dst="lib", keep_path=False)
- self.copy("*.dll", dst="bin", keep_path=False)
- self.copy("*.so", dst="lib", keep_path=False)
- self.copy("*.dylib", dst="lib", keep_path=False)
- self.copy("*.a", dst="lib", keep_path=False)
- def package_info(self):
- self.cpp_info.libs = ["implot"]
Advertisement
Add Comment
Please, Sign In to add comment