File tree 3 files changed +37
-0
lines changed
3 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -302,6 +302,18 @@ install(
302
302
FILES_MATCHING PATTERN "*.h"
303
303
)
304
304
305
+ export (
306
+ TARGETS yaml-cpp
307
+ FILE "${PROJECT_BINARY_DIR} /yaml-cpp-targets.cmake" )
308
+ export (PACKAGE yaml-cpp)
309
+ set (EXPORT_TARGETS yaml-cpp CACHE INTERNAL "export targets" )
310
+
311
+ set (CONFIG_INCLUDE_DIRS "${YAML_CPP_SOURCE_DIR} /include" )
312
+ configure_file (${CMAKE_CURRENT_SOURCE_DIR} /yaml-cpp-config.cmake.in
313
+ "${PROJECT_BINARY_DIR} /yaml-cpp-config.cmake" @ONLY)
314
+ configure_file (${CMAKE_CURRENT_SOURCE_DIR} /yaml-cpp-config-version .cmake.in
315
+ "${PROJECT_BINARY_DIR} /yaml-cpp-config-version.cmake" @ONLY)
316
+
305
317
if (UNIX )
306
318
set (PC_FILE ${CMAKE_BINARY_DIR} /yaml-cpp.pc)
307
319
configure_file ("yaml-cpp.pc.cmake" ${PC_FILE} @ONLY)
Original file line number Diff line number Diff line change
1
+ set (PACKAGE_VERSION "@YAML_CPP_VERSION@" )
2
+
3
+ # Check whether the requested PACKAGE_FIND_VERSION is compatible
4
+ if ("${PACKAGE_VERSION} " VERSION_LESS "${PACKAGE_FIND_VERSION} " )
5
+ set (PACKAGE_VERSION_COMPATIBLE FALSE )
6
+ else ()
7
+ set (PACKAGE_VERSION_COMPATIBLE TRUE )
8
+ if ("${PACKAGE_VERSION} " VERSION_EQUAL "${PACKAGE_FIND_VERSION} " )
9
+ set (PACKAGE_VERSION_EXACT TRUE )
10
+ endif ()
11
+ endif ()
Original file line number Diff line number Diff line change
1
+ # - Config file for the yaml-cpp package
2
+ # It defines the following variables
3
+ # YAML_CPP_INCLUDE_DIR - include directory
4
+ # YAML_CPP_LIBRARIES - libraries to link against
5
+
6
+ # Compute paths
7
+ get_filename_component (YAML_CPP_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE} " PATH )
8
+ set (YAML_CPP_INCLUDE_DIR "@CONFIG_INCLUDE_DIRS@" )
9
+
10
+ # Our library dependencies (contains definitions for IMPORTED targets)
11
+ include ("${YAML_CPP_CMAKE_DIR} /yaml-cpp-targets.cmake" )
12
+
13
+ # These are IMPORTED targets created by yaml-cpp-targets.cmake
14
+ set (YAML_CPP_LIBRARIES "@EXPORT_TARGETS@" )
You can’t perform that action at this time.
0 commit comments