Merge branch 'master' of https://gitee.com/290198252/generallib
# Conflicts: # CMakeLists.txtmaster
commit
6aa9d42d4d
21
conanfile.py
21
conanfile.py
|
@ -12,7 +12,7 @@ class GenerallibConan(ConanFile):
|
||||||
exports_sources = "general*", "test*"
|
exports_sources = "general*", "test*"
|
||||||
def source(self):
|
def source(self):
|
||||||
tools.rmdir("pkgsrc")
|
tools.rmdir("pkgsrc")
|
||||||
git = tools.Git(folder=self.source_folder)
|
git = tools.Git(folder=self.source_folder + "/pkgsrc")
|
||||||
git.clone("https://gitee.com/290198252/generallib.git")
|
git.clone("https://gitee.com/290198252/generallib.git")
|
||||||
|
|
||||||
def package(self):
|
def package(self):
|
||||||
|
@ -21,11 +21,18 @@ class GenerallibConan(ConanFile):
|
||||||
|
|
||||||
def build(self):
|
def build(self):
|
||||||
cmake = CMake(self)
|
cmake = CMake(self)
|
||||||
# same as cmake.configure(source_folder=self.source_folder, build_folder=self.build_folder)
|
print("path " + self.source_folder + " is where the package built")
|
||||||
cmake.configure(source_folder="pkgsrc", build_folder="build")
|
print("build env is ",tools.get_env("BUILD_ENV"))
|
||||||
cmake.build()
|
tools.rmdir(tools.unix_path(self.package_folder)+"/build")
|
||||||
cmake.test()
|
tools.mkdir(tools.unix_path(self.package_folder)+"/build")
|
||||||
cmake.install()
|
if tools.os_info.is_windows:
|
||||||
|
print("current os windows")
|
||||||
|
if tools.os_info.is_cygwin:
|
||||||
|
print("cygwin build")
|
||||||
|
if tools.get_env("BUILD_ENV")=="msys":
|
||||||
|
print("msys build")
|
||||||
|
tools.run_in_windows_bash(self, subsystem="msys",cwd="pkgsrc",msys_mingw=True,bashcmd="cmake build -G\"MinGW Makefiles\" " + tools.unix_path(self.source_folder + "/pkgsrc"))
|
||||||
|
tools.run_in_windows_bash(self, subsystem="msys",cwd="pkgsrc",msys_mingw=True,bashcmd="cmake --build . ")
|
||||||
|
|
||||||
def requirements(self):
|
def requirements(self):
|
||||||
self.build_requires("tool_win/0.1@user/stable")
|
self.requires("libevent/2.1.2", private=True, override=False)
|
Loading…
Reference in New Issue