You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I tried to rewrite example examples2/tutorial/developing_packages/editable_packages using submodules hello and say, but when I did it CMake stopped resolving libraries frommodules on which it depends (from say module in case of cmake cache generation for hello).
Configuration
say/conanfile.py:
fromconanimportConanFilefromconan.tools.cmakeimportCMakeToolchain, CMake, cmake_layoutclassSayConan(ConanFile):
name="say"version="1.0"# Binary configurationsettings="os", "compiler", "build_type", "arch"options= {"shared": [True, False], "fPIC": [True, False]}
default_options= {"shared": False, "fPIC": True}
# Sources are located in the same place as this recipe, copy them to the recipeexports_sources="CMakeLists.txt", "src/*", "include/*"_folders_rel_root=".."_folders_rel_sub="say"defconfig_options(self):
ifself.settings.os=="Windows":
delself.options.fPICdeflayout(self):
self.folders.root=self._folders_rel_rootself.folders.subproject=self._folders_rel_subcmake_layout(self)
defgenerate(self):
tc=CMakeToolchain(self)
tc.generate()
defbuild(self):
cmake=CMake(self)
cmake.configure()
cmake.build()
defpackage(self):
cmake=CMake(self)
cmake.install()
defpackage_info(self):
self.cpp_info.libs= ["say"]
(conan) nikit@host hello % cmake --preset conan-release
Preset CMake variables:
CMAKE_BUILD_TYPE="Release"
CMAKE_POLICY_DEFAULT_CMP0091="NEW"
CMAKE_TOOLCHAIN_FILE:FILEPATH="/home/nikit/Workspaces/research/conan/simple/examples2/tutorial/developing_packages/editable_packages/hello/build/Release/generators/conan_toolchain.cmake"
-- Using Conan toolchain: /home/nikit/Workspaces/research/conan/simple/examples2/tutorial/developing_packages/editable_packages/hello/build/Release/generators/conan_toolchain.cmake
-- Conan toolchain: C++ Standard 20 with extensions OFF
-- Conan: Target declared 'say::say'
CMake Error at build/Release/generators/cmakedeps_macros.cmake:64 (message):
Library 'say' not found in package. If 'say' is a system library, declare
it with 'cpp_info.system_libs' property
Call Stack (most recent call first):
build/Release/generators/say-Target-release.cmake:24 (conan_package_library_targets)
build/Release/generators/sayTargets.cmake:26 (include)
build/Release/generators/say-config.cmake:16 (include)
CMakeLists.txt:5 (find_package)
The text was updated successfully, but these errors were encountered:
Thanks for reporting and for the detailed and minimal repro case, it really helps to investigate.
Indeed it seems a gap in editable packages I am exploring a solution in #13983, I still need to add tests, etc, but it seemed it solved your repro case.
Environment details
Linux host 6.1.19-gentoo-x86_64
gcc (Gentoo 12.2.1_p20230428-r1 p2) 12.2.1
Conan version 2.0.6
Python 3.11.3
Steps to reproduce
Description
I tried to rewrite example
examples2/tutorial/developing_packages/editable_packages
using submodules hello and say, but when I did it CMake stopped resolving libraries frommodules on which it depends (from say module in case of cmake cache generation for hello).Configuration
say/conanfile.py
:hello/conanfile.py
:Steps
conan editable add say
Logs
The text was updated successfully, but these errors were encountered: