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

json-schema-validator: restore correct CMake target name in CMakeDeps #14194

Merged
Merged
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
2 changes: 1 addition & 1 deletion recipes/json-schema-validator/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def _module_file_rel_path(self):

def package_info(self):
self.cpp_info.set_property("cmake_file_name", "nlohmann_json_schema_validator")
self.cpp_info.set_property("cmake_target_name", "nlohmann_json_schema_validator::nlohmann_json_schema_validator")
self.cpp_info.set_property("cmake_target_name", "nlohmann_json_schema_validator")
self.cpp_info.libs = ["json-schema-validator" if scm.Version(self.version) < "2.1.0" else "nlohmann_json_schema_validator"]

# TODO: to remove in conan v2 once cmake_find_package* generators removed
Expand Down
8 changes: 4 additions & 4 deletions recipes/json-schema-validator/all/test_package/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
cmake_minimum_required(VERSION 3.1)
project(test_package CXX)
cmake_minimum_required(VERSION 3.8)
project(test_package LANGUAGES CXX)

find_package(nlohmann_json_schema_validator CONFIG REQUIRED)

add_executable(${PROJECT_NAME} test_package.cpp)
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11)
target_link_libraries(${PROJECT_NAME} nlohmann_json_schema_validator::nlohmann_json_schema_validator)
target_link_libraries(${PROJECT_NAME} nlohmann_json_schema_validator)
target_compile_features(${PROJECT_NAME} PRIVATE cxx_std_11)
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
cmake_minimum_required(VERSION 3.1)
project(test_package CXX)
project(test_package)

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

find_package(nlohmann_json_schema_validator CONFIG REQUIRED)

add_executable(${PROJECT_NAME} ../test_package/test_package.cpp)
set_property(TARGET ${PROJECT_NAME} PROPERTY CXX_STANDARD 11)
target_link_libraries(${PROJECT_NAME} nlohmann_json_schema_validator)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../test_package
${CMAKE_CURRENT_BINARY_DIR}/test_package)