Skip to content

Commit

Permalink
Update ticpp to newer version.
Browse files Browse the repository at this point in the history
  • Loading branch information
erikogenvik committed Jul 9, 2023
1 parent 77b5e11 commit 91cbc01
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions tools/conan/ticpp/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os

from conan import ConanFile
from conan.tools.cmake import CMakeToolchain, CMake
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout
from conan.tools.files import get, collect_libs, copy
from conan.tools.microsoft import is_msvc

Expand All @@ -16,10 +16,13 @@ class Conan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False]}
default_options = {"shared": False}
sha1 = "eb79120ea16b847ce9f483a298a394050f463d6b"
sha1 = "6f45ec628cbf34784bb3b3132c0d00aac8e491c6"
user = "smartbody"
package_type = "library"

def layout(self):
cmake_layout(self)

def generate(self):
tc = CMakeToolchain(self)
tc.variables['BUILD_SHARED_LIBS'] = self.options.shared
Expand All @@ -36,16 +39,9 @@ def build(self):
cmake.build()

def package(self):
print(self.build_folder)
print(os.getcwd())
copy(self, "*.h", dst=os.path.join(self.package_folder, "include/tinyxml"), src=self.build_folder)
copy(self, "*.lib", dst=os.path.join(self.package_folder, "lib"), keep_path=False, src=self.build_folder)
copy(self, "*.a", dst=os.path.join(self.package_folder, "lib"), keep_path=False, src=self.build_folder)
copy(self, "*.so", dst=os.path.join(self.package_folder, "lib"), keep_path=False, src=self.build_folder)
copy(self, "*.so.*", dst=os.path.join(self.package_folder, "lib"), keep_path=False, src=self.build_folder)
copy(self, "*.dylib", dst=os.path.join(self.package_folder, "lib"), keep_path=False, src=self.build_folder)
copy(self, "*.dll", dst=os.path.join(self.package_folder, "bin"), keep_path=False, src=self.build_folder)
print("copied")
cmake = CMake(self)
cmake.install()
copy(self, "*.h", dst=os.path.join(self.package_folder, "include/tinyxml"), src=self.source_folder)

def package_info(self):
self.cpp_info.libs = collect_libs(self)

0 comments on commit 91cbc01

Please sign in to comment.