Skip to content

Commit

Permalink
Merge branch 'master' into feature/AddPCL
Browse files Browse the repository at this point in the history
  • Loading branch information
EstebanDugueperoux2 authored Aug 13, 2023
2 parents 24c68d1 + 22b6c2b commit 2cb3b99
Show file tree
Hide file tree
Showing 135 changed files with 2,964 additions and 1,120 deletions.
3 changes: 3 additions & 0 deletions recipes/ctre/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
sources:
"3.8":
url: "https://github.com/hanickadot/compile-time-regular-expressions/archive/v3.8.tar.gz"
sha256: "6462ee41fa6aa12075f6b9d13f42358091d32963087443a6669d2c94232eea04"
"3.7.2":
url: "https://github.com/hanickadot/compile-time-regular-expressions/archive/v3.7.2.tar.gz"
sha256: "0711a6f97496e010f72adab69839939a9e50ba35ad87779e422ae3ff3b0edfc3"
Expand Down
10 changes: 7 additions & 3 deletions recipes/ctre/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ class CtreConan(ConanFile):
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/hanickadot/compile-time-regular-expressions"
topics = ("cpp17", "regex", "compile-time-regular-expressions", "header-only")
package_type = "header-library"
settings = "os", "arch", "compiler", "build_type"
no_copy_source = True

Expand All @@ -38,8 +39,11 @@ def validate(self):
raise ConanInvalidConfiguration(f"{self.ref} doesn't support MSVC < 16")
elif compiler == "gcc" and compiler_version < min_gcc:
raise ConanInvalidConfiguration(f"{self.ref} doesn't support gcc < {min_gcc}")
elif compiler == "clang" and compiler_version < "6.0":
raise ConanInvalidConfiguration(f"{self.ref} doesn't support clang < 6.0")
elif compiler == "clang":
if compiler_version < "6.0":
raise ConanInvalidConfiguration(f"{self.ref} doesn't support clang < 6.0")
if ctre_version == "3.4.1" and compiler_version >= "12.0" and not self.settings.compiler.get_safe("cppstd"):
raise ConanInvalidConfiguration(f"{self.ref} doesn't support clang >= 12.0 without cppstd. Please set cppstd.")
elif compiler == "apple-clang":
if compiler_version < "10.0":
raise ConanInvalidConfiguration(f"{self.ref} doesn't support Apple clang < 10.0")
Expand All @@ -53,7 +57,7 @@ def package_id(self):
self.info.clear()

def source(self):
get(self, **self.conan_data["sources"][self.version], destination=self.source_folder, strip_root=True)
get(self, **self.conan_data["sources"][self.version], strip_root=True)

def package(self):
copy(self, pattern="*.hpp", src=os.path.join(self.source_folder, "include"), dst=os.path.join(self.package_folder, "include"))
Expand Down
2 changes: 2 additions & 0 deletions recipes/ctre/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
versions:
"3.8":
folder: all
"3.7.2":
folder: all
"3.7.1":
Expand Down
32 changes: 22 additions & 10 deletions recipes/dtl/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,40 @@
from conans import ConanFile, tools
import os

required_conan_version = ">=1.33.0"
from conan import ConanFile
from conan.tools.build import check_min_cppstd
from conan.tools.files import copy, get
from conan.tools.layout import basic_layout

required_conan_version = ">=1.52.0"


class DtlConan(ConanFile):
name = "dtl"
description = "diff template library written by C++"
topics = ("diff", "library", "algorithm")
license = "BSD-3-Clause"
url = "https://github.com/conan-io/conan-center-index"
homepage = "https://github.com/cubicdaiya/dtl"
topics = ("diff", "library", "algorithm", "header-only")

package_type = "header-library"
settings = "os", "arch", "compiler", "build_type"
no_copy_source = True

@property
def _source_subfolder(self):
return "source_subfolder"
def layout(self):
basic_layout(self, src_folder="src")

def package_id(self):
self.info.header_only()
self.info.clear()

def source(self):
tools.get(**self.conan_data["sources"][self.version], strip_root=True, destination=self._source_subfolder)
get(self, **self.conan_data["sources"][self.version], strip_root=True)

def package(self):
self.copy(os.path.join("dtl", "*.hpp"), dst="include", src=self._source_subfolder)
self.copy(pattern="COPYING", dst="licenses", src=self._source_subfolder)
copy(self, "COPYING",
dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
copy(self, os.path.join("dtl", "*.hpp"),
dst=os.path.join(self.package_folder, "include"), src=self.source_folder)

def package_info(self):
self.cpp_info.bindirs = []
self.cpp_info.libdirs = []
7 changes: 2 additions & 5 deletions recipes/dtl/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
cmake_minimum_required(VERSION 3.1)
project(test_package)

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(TARGETS)
cmake_minimum_required(VERSION 3.15)
project(test_package LANGUAGES CXX)

find_package(dtl CONFIG REQUIRED)

Expand Down
21 changes: 15 additions & 6 deletions recipes/dtl/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,26 @@
from conans import ConanFile, CMake, tools
from conan import ConanFile
from conan.tools.build import can_run
from conan.tools.cmake import cmake_layout, CMake
import os


class TestPackageConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "cmake", "cmake_find_package_multi"
settings = "os", "arch", "compiler", "build_type"
generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv"
test_type = "explicit"

def requirements(self):
self.requires(self.tested_reference_str)

def layout(self):
cmake_layout(self)

def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()

def test(self):
if not tools.cross_building(self):
bin_path = os.path.join("bin", "test_package")
self.run(bin_path, run_environment=True)
if can_run(self):
bin_path = os.path.join(self.cpp.build.bindir, "test_package")
self.run(bin_path, env="conanrun")
8 changes: 8 additions & 0 deletions recipes/dtl/all/test_v1_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cmake_minimum_required(VERSION 3.15)
project(test_package)

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(TARGETS)

add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/
${CMAKE_CURRENT_BINARY_DIR}/test_package/)
17 changes: 17 additions & 0 deletions recipes/dtl/all/test_v1_package/conanfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
from conans import ConanFile, CMake, tools
import os


class TestPackageConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "cmake", "cmake_find_package_multi"

def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()

def test(self):
if not tools.cross_building(self):
bin_path = os.path.join("bin", "test_package")
self.run(bin_path, run_environment=True)
7 changes: 0 additions & 7 deletions recipes/etc2comp/all/CMakeLists.txt

This file was deleted.

1 change: 0 additions & 1 deletion recipes/etc2comp/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,3 @@ sources:
patches:
"cci.20170424":
- patch_file: "patches/fix-cmake.patch"
base_path: "source_subfolder"
85 changes: 44 additions & 41 deletions recipes/etc2comp/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
import os
import glob
from conans import ConanFile, CMake, tools

from conan import ConanFile
from conan.tools.build import check_min_cppstd
from conan.tools.cmake import CMake, CMakeToolchain, cmake_layout
from conan.tools.files import apply_conandata_patches, collect_libs, copy, export_conandata_patches, get

required_conan_version = ">=1.53.0"


class Etc2compConan(ConanFile):
name = "etc2comp"
description = "Open source c++ skeletal animation library and toolset."
license = "Apache-2.0",
topics = ("conan", "texture", "etc2", "compressor")
homepage = "https://github.com/google/etc2comp"
license = ("Apache-2.0",)
url = "https://github.com/conan-io/conan-center-index"
exports_sources = ["CMakeLists.txt", "patches/**"]
generators = "cmake"
homepage = "https://github.com/google/etc2comp"
topics = ("texture", "etc2", "compressor")

package_type = "library"
settings = "os", "arch", "compiler", "build_type"
options = {
"shared": [True, False],
Expand All @@ -21,54 +27,51 @@ class Etc2compConan(ConanFile):
"fPIC": True,
}

_cmake = None

@property
def _source_subfolder(self):
return "source_subfolder"

@property
def _build_subfolder(self):
return "build_subfolder"
def export_sources(self):
export_conandata_patches(self)

def config_options(self):
if self.settings.os == 'Windows':
if self.settings.os == "Windows":
del self.options.fPIC

def configure(self):
if self.options.shared:
del self.options.fPIC
self.options.rm_safe("fPIC")

def layout(self):
cmake_layout(self, src_folder="src")

def validate(self):
if self.settings.compiler.cppstd:
tools.check_min_cppstd(self, 11)
check_min_cppstd(self, 11)

def source(self):
tools.get(**self.conan_data["sources"][self.version])
extracted_dir = glob.glob('etc2comp-*/')[0]
os.rename(extracted_dir, self._source_subfolder)
get(self, **self.conan_data["sources"][self.version], strip_root=True)

def _configure_cmake(self):
if self._cmake:
return self._cmake
self._cmake = CMake(self)
self._cmake.configure(build_folder=self._build_subfolder)
return self._cmake
def generate(self):
tc = CMakeToolchain(self)
tc.generate()

def build(self):
for patch in self.conan_data.get("patches", {}).get(self.version, []):
tools.patch(**patch)
cmake = self._configure_cmake()
apply_conandata_patches(self)
cmake = CMake(self)
cmake.configure()
cmake.build()

def package(self):
self.copy(pattern="LICENSE", dst="licenses", src=self._source_subfolder)
self.copy("*.lib", dst="lib", keep_path=False)
self.copy("*.dll", dst="bin", keep_path=False)
self.copy("*.so*", dst="lib", keep_path=False, symlinks=True)
self.copy("*.dylib", dst="lib", keep_path=False)
self.copy("*.a", dst="lib", keep_path=False)
self.copy("*.h", dst=os.path.join("include"), src=os.path.join(self._source_subfolder, "EtcLib"), keep_path=False)
copy(self, pattern="LICENSE", dst=os.path.join(self.package_folder, "licenses"), src=self.source_folder)
for pattern in ["*.lib", "*.a", "*.so*", "*.dylib"]:
copy(self, pattern, dst=os.path.join(self.package_folder, "lib"), src=self.build_folder, keep_path=False)
copy(self, "*.dll", dst=os.path.join(self.package_folder, "bin"), src=self.build_folder, keep_path=False)
copy(
self,
"*.h",
dst=os.path.join(self.package_folder, "include"),
src=os.path.join(self.source_folder, "EtcLib"),
keep_path=False,
)

def package_info(self):
self.cpp_info.libs = tools.collect_libs(self)
if self.settings.os == "Linux":
self.cpp_info.system_libs.append("pthread")
self.cpp_info.libs = collect_libs(self)
if self.settings.os in ["Linux", "FreeBSD"]:
self.cpp_info.system_libs = ["pthread"]
9 changes: 4 additions & 5 deletions recipes/etc2comp/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
cmake_minimum_required(VERSION 3.1)
project(test_package)
cmake_minimum_required(VERSION 3.15)
project(test_package LANGUAGES CXX)

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup()
find_package(etc2comp REQUIRED CONFIG)

add_executable(${CMAKE_PROJECT_NAME} test_package.cpp)
target_link_libraries(${CMAKE_PROJECT_NAME} ${CONAN_LIBS})
target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE etc2comp::etc2comp)
set_property(TARGET ${CMAKE_PROJECT_NAME} PROPERTY CXX_STANDARD 11)
22 changes: 16 additions & 6 deletions recipes/etc2comp/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
from conans import ConanFile, CMake, tools
from conan import ConanFile
from conan.tools.build import can_run
from conan.tools.cmake import cmake_layout, CMake
import os


class TestPackageConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "cmake"
settings = "os", "arch", "compiler", "build_type"
generators = "CMakeDeps", "CMakeToolchain", "VirtualRunEnv"
test_type = "explicit"

def requirements(self):
self.requires(self.tested_reference_str)

def layout(self):
cmake_layout(self)

def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()

def test(self):
if not tools.cross_building(self.settings):
bin_path = os.path.join("bin", "test_package")
self.run(bin_path, run_environment=True)
if can_run(self):
bin_path = os.path.join(self.cpp.build.bindir, "test_package")
self.run(bin_path, env="conanrun")
8 changes: 8 additions & 0 deletions recipes/etc2comp/all/test_v1_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
cmake_minimum_required(VERSION 3.15)
project(test_package)

include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
conan_basic_setup(TARGETS)

add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package/
${CMAKE_CURRENT_BINARY_DIR}/test_package/)
16 changes: 16 additions & 0 deletions recipes/etc2comp/all/test_v1_package/conanfile.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
from conans import ConanFile, CMake, tools
import os

class TestPackageConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "cmake", "cmake_find_package_multi"

def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()

def test(self):
if not tools.cross_building(self.settings):
bin_path = os.path.join("bin", "test_package")
self.run(bin_path, run_environment=True)
8 changes: 5 additions & 3 deletions recipes/fast-dds/all/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import os
import textwrap

from conan import ConanFile
from conan.errors import ConanInvalidConfiguration
from conan.tools.build import check_min_cppstd
Expand All @@ -15,8 +18,7 @@
)
from conan.tools.microsoft import check_min_vs, is_msvc_static_runtime, is_msvc, msvc_runtime_flag
from conan.tools.scm import Version
import os
import textwrap


required_conan_version = ">=1.53.0"

Expand Down Expand Up @@ -69,7 +71,7 @@ def layout(self):

def requirements(self):
self.requires("tinyxml2/9.0.0")
self.requires("asio/1.28.0")
self.requires("asio/1.28.0") # This is now a package_type = header
self.requires("fast-cdr/1.0.27", transitive_headers=True, transitive_libs=True)
self.requires("foonathan-memory/0.7.3")
if self.options.with_ssl:
Expand Down
Loading

0 comments on commit 2cb3b99

Please sign in to comment.