Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMakeDeps should be defined in conanfile #564

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions conan_provider.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -360,11 +360,11 @@ macro(conan_provide_dependency method package_name)
get_property(_MULTICONFIG_GENERATOR GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG)
if(NOT _MULTICONFIG_GENERATOR)
message(STATUS "CMake-Conan: Installing single configuration ${CMAKE_BUILD_TYPE}")
conan_install(-pr ${CMAKE_BINARY_DIR}/conan_host_profile --build=missing -g CMakeDeps)
conan_install(-pr ${CMAKE_BINARY_DIR}/conan_host_profile --build=missing)
else()
message(STATUS "CMake-Conan: Installing both Debug and Release")
conan_install(-pr ${CMAKE_BINARY_DIR}/conan_host_profile -s build_type=Release --build=missing -g CMakeDeps)
conan_install(-pr ${CMAKE_BINARY_DIR}/conan_host_profile -s build_type=Debug --build=missing -g CMakeDeps)
conan_install(-pr ${CMAKE_BINARY_DIR}/conan_host_profile -s build_type=Release --build=missing)
conan_install(-pr ${CMAKE_BINARY_DIR}/conan_host_profile -s build_type=Debug --build=missing)
endif()
unset(_MULTICONFIG_GENERATOR)
else()
Expand Down
5 changes: 4 additions & 1 deletion example/conanfile.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
[requires]
fmt/9.1.0

[generators]
CMakeDeps

[layout]
cmake_layout
cmake_layout
3 changes: 3 additions & 0 deletions tests/resources/basic/conanfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
hello/0.1
bye/0.1
boost/1.77.0

[generators]
CMakeDeps
7 changes: 0 additions & 7 deletions tests/resources/fake_boost_recipe/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ class BoostRecipe(ConanFile):
version = "1.77.0"
package_type = "library"

# Optional metadata
license = "<Put the package license here>"
author = "<Put your name here> <And your email here>"
url = "<Package recipe repository url here, for issues about the package>"
description = "<Description of bye package here>"
topics = ("<Put some tag here>", "<here>", "<and here>")

# Binary configuration
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "fPIC": [True, False]}
Expand Down
7 changes: 0 additions & 7 deletions tests/resources/libbye/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ class byeRecipe(ConanFile):
version = "0.1"
package_type = "library"

# Optional metadata
license = "<Put the package license here>"
author = "<Put your name here> <And your email here>"
url = "<Package recipe repository url here, for issues about the package>"
description = "<Description of bye package here>"
topics = ("<Put some tag here>", "<here>", "<and here>")

# Binary configuration
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "fPIC": [True, False]}
Expand Down
3 changes: 3 additions & 0 deletions tests/resources/subdir/conanfile.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
hello/0.1
bye/0.1
subdir/0.1

[generators]
CMakeDeps