Skip to content

Commit 5b17b87

Browse files
authored
libxslt: define cmake additional variable prefixes (#27956)
1 parent 05ea80c commit 5b17b87

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

recipes/libxslt/all/conanfile.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ def package(self):
190190
def package_info(self):
191191
self.cpp_info.set_property("cmake_find_mode", "both")
192192
self.cpp_info.set_property("cmake_file_name", "LibXslt")
193+
self.cpp_info.set_property("cmake_additional_variables_prefixes", ["LIBXSLT"])
193194
self.cpp_info.set_property("pkg_config_name", "none") # see the two standalone ones instead
194195

195196
prefix = "lib" if is_msvc(self) else ""

recipes/libxslt/all/test_package/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ cmake_minimum_required(VERSION 3.15)
22
project(test_package LANGUAGES C)
33

44
find_package(LibXslt REQUIRED)
5+
if(NOT DEFINED LIBXSLT_INCLUDE_DIR)
6+
message(FATAL_ERROR "LIBXSLT_INCLUDE_DIR variable not defined, expected to be set by Conan-generated CMake files")
7+
endif()
8+
59
find_package(LibXml2 REQUIRED)
610

711
add_executable(${PROJECT_NAME} libxslt_tutorial.c)

0 commit comments

Comments
 (0)