Skip to content

Commit 3b54cde

Browse files
committed
fix: package_info remove cmake_paths
1 parent dfd79a3 commit 3b54cde

File tree

4 files changed

+38
-2
lines changed

4 files changed

+38
-2
lines changed

recipes/ignition-tools/all/conanfile.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,6 @@ def package_info(self):
121121
self.cpp_info.set_property("cmake_file_name", "ignition-tools")
122122
self.cpp_info.components["backward"].names["cmake_find_package"] = "backward"
123123
self.cpp_info.components["backward"].names["cmake_find_package_multi"] = "backward"
124-
self.cpp_info.components["backward"].names["cmake_paths"] = "backward"
125124
self.cpp_info.components["backward"].bindirs = ["bin"]
126125

127126
self.cpp_info.components["backward"].libs = []
@@ -132,7 +131,6 @@ def package_info(self):
132131
self.cpp_info.set_property("cmake_build_modules", [self._module_file_rel_path])
133132
self.cpp_info.components["backward"].build_modules["cmake_find_package"] = [self._module_file_rel_path]
134133
self.cpp_info.components["backward"].build_modules["cmake_find_package_multi"] = [self._module_file_rel_path]
135-
self.cpp_info.components["backward"].build_modules["cmake_paths"] = [self._module_file_rel_path]
136134

137135
@property
138136
def _module_dir_rel_path(self):
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
cmake_minimum_required(VERSION 3.8)
2+
project(test_package)
3+
4+
include(${CMAKE_BINARY_DIR}/conan_paths.cmake)
5+
6+
find_package(ignition-tools REQUIRED COMPONENTS backward)
7+
8+
add_executable(${PROJECT_NAME} test_package.cpp)
9+
target_link_libraries(${PROJECT_NAME} ignition-tools::backward)
10+
set_target_properties(${PROJECT_NAME} PROPERTIES
11+
CXX_STANDARD 17
12+
CXX_STANDARD_REQUIRED ON
13+
CXX_EXTENSIONS ON
14+
)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# pylint: skip-file
2+
from conans import ConanFile, CMake, tools
3+
import os
4+
5+
class TestPackageConan(ConanFile):
6+
settings = "os", "compiler", "build_type", "arch"
7+
generators = "cmake_paths", "cmake_find_package"
8+
9+
def build(self):
10+
cmake = CMake(self)
11+
cmake.configure()
12+
cmake.build()
13+
14+
def test(self):
15+
if not tools.cross_building(self.settings):
16+
bin_path = os.path.abspath(os.path.join("test_package"))
17+
self.run(bin_path, run_environment=True)
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include <iostream>
2+
3+
4+
int main(int argc, char **argv)
5+
{
6+
std::cout << "Hello from ignition-tools test_package\n";
7+
}

0 commit comments

Comments
 (0)