Skip to content

Commit

Permalink
add find_package
Browse files Browse the repository at this point in the history
  • Loading branch information
toge committed Jan 26, 2022
1 parent 6f6c920 commit 2823bd9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion recipes/rapidyaml/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class RapidYAMLConan(ConanFile):
"fPIC": True,
"with_default_callbacks": True,
}
generators = "cmake"
generators = "cmake", "cmake_find_package_multi"

_compiler_required_cpp11 = {
"Visual Studio": "13",
Expand Down
21 changes: 14 additions & 7 deletions recipes/rapidyaml/all/patches/001-remove-internal-c4core.patch
Original file line number Diff line number Diff line change
@@ -1,27 +1,34 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a75251a..605f9d6 100644
index a75251a..48e35c8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,9 +17,6 @@ option(RYML_DBG "Enable (very verbose) ryml debug prints." OFF)
@@ -15,10 +15,9 @@ option(RYML_BUILD_API "Enable API generation (python, etc)" OFF)
option(RYML_DBG "Enable (very verbose) ryml debug prints." OFF)

#-------------------------------------------------------

-#-------------------------------------------------------
+find_package(c4core REQUIRED CONFIG)

-c4_require_subproject(c4core INCORPORATE
- SUBDIRECTORY ${RYML_EXT_DIR}/c4core)
-
+#-------------------------------------------------------

c4_add_library(ryml
SOURCES
ryml.hpp
@@ -52,8 +49,6 @@ c4_add_library(ryml
@@ -50,10 +49,10 @@ c4_add_library(ryml
ryml.natvis
SOURCE_ROOT ${RYML_SRC_DIR}
INC_DIRS
+ $<BUILD_INTERFACE:${C4CORE_INCLUDE_DIR}>
$<BUILD_INTERFACE:${RYML_SRC_DIR}>
$<INSTALL_INTERFACE:include>
- LIBS c4core
- INCORPORATE c4core
+ LIBS c4core::c4core
)

if(NOT RYML_DEFAULT_CALLBACKS)
@@ -68,7 +63,6 @@ endif()
@@ -68,7 +67,6 @@ endif()
#-------------------------------------------------------

c4_install_target(ryml)
Expand Down

0 comments on commit 2823bd9

Please sign in to comment.