yaml-cpp.paketlendi

This commit is contained in:
milisarge 2017-06-26 16:44:33 +03:00
parent a6826a789c
commit 89ea613bdf
3 changed files with 124 additions and 0 deletions

View File

@ -0,0 +1,23 @@
From 1f4b6d5c855b59e849b7228090981c520928c2a4 Mon Sep 17 00:00:00 2001
From: Ovidiu-Florin BOGDAN <ovidiub13@users.noreply.github.com>
Date: Fri, 2 Dec 2016 16:51:07 +0200
Subject: [PATCH] Remove prefix duplication in yaml-cpp.pc.cmake
---
yaml-cpp.pc.cmake | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/yaml-cpp.pc.cmake b/yaml-cpp.pc.cmake
index 04d343f..044ef78 100644
--- a/yaml-cpp.pc.cmake
+++ b/yaml-cpp.pc.cmake
@@ -1,7 +1,5 @@
-prefix=@CMAKE_INSTALL_PREFIX@
-exec_prefix=@CMAKE_INSTALL_PREFIX@
-libdir=${prefix}/@LIB_INSTALL_DIR@
-includedir=${prefix}/@INCLUDE_INSTALL_ROOT_DIR@
+libdir=@LIB_INSTALL_DIR@
+includedir=@INCLUDE_INSTALL_ROOT_DIR@
Name: Yaml-cpp
Description: A YAML parser and emitter for C++

View File

@ -0,0 +1,79 @@
From 500db60f899ae6845039d4eca503133d0db81dbd Mon Sep 17 00:00:00 2001
From: Paul Novotny <paul@paulnovo.us>
Date: Wed, 25 Nov 2015 11:33:36 -0500
Subject: [PATCH] Include cmake files in install
This adds yaml-cpp-config.cmake, yaml-cpp-config-version.cmake, and
yaml-cpp-targets.cmake to the cmake install. As a result, cmake's
find_package can easily find yaml-cpp for software that depends on
yaml-cpp.
Add code to install cmake files to $CMAKE_INSTALL_PREFIX/CMake on
Windows, which is the de-facto standard.
Closes jbeder/yaml-cpp#336 jbeder/yaml-cpp#127
---
CMakeLists.txt | 28 +++++++++++++++++++++++-----
1 file changed, 23 insertions(+), 5 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5b326a3..cbaad07 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -256,15 +256,15 @@ else()
set(_library_dir lib)
endif()
-set(INCLUDE_INSTALL_ROOT_DIR include)
+set(INCLUDE_INSTALL_ROOT_DIR ${CMAKE_INSTALL_PREFIX}/include)
set(INCLUDE_INSTALL_DIR ${INCLUDE_INSTALL_ROOT_DIR}/yaml-cpp)
-set(LIB_INSTALL_DIR "${_library_dir}${LIB_SUFFIX}")
+set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${_library_dir}${LIB_SUFFIX}")
set(_INSTALL_DESTINATIONS
- RUNTIME DESTINATION bin
+ RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
- ARCHIVE DESTINATION "lib${LIB_SUFFIX}"
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}"
)
@@ -300,7 +300,7 @@ if(MSVC)
endif()
endif()
-install(TARGETS yaml-cpp ${_INSTALL_DESTINATIONS})
+install(TARGETS yaml-cpp EXPORT yaml-cpp-targets ${_INSTALL_DESTINATIONS})
install(
DIRECTORY ${header_directory}
DESTINATION ${INCLUDE_INSTALL_DIR}
@@ -316,9 +316,27 @@ set(EXPORT_TARGETS yaml-cpp CACHE INTERNAL "export targets")
set(CONFIG_INCLUDE_DIRS "${YAML_CPP_SOURCE_DIR}/include")
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp-config.cmake.in
"${PROJECT_BINARY_DIR}/yaml-cpp-config.cmake" @ONLY)
+
+if(WIN32 AND NOT CYGWIN)
+ set(INSTALL_CMAKE_DIR ${CMAKE_INSTALL_PREFIX}/CMake)
+else()
+ set(INSTALL_CMAKE_DIR ${LIB_INSTALL_DIR}/cmake/yaml-cpp)
+endif()
+
+file(RELATIVE_PATH REL_INCLUDE_DIR "${INSTALL_CMAKE_DIR}" "${INCLUDE_INSTALL_ROOT_DIR}")
+set(CONFIG_INCLUDE_DIRS "\${YAML_CPP_CMAKE_DIR}/${REL_INCLUDE_DIR}")
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp-config.cmake.in
+ "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/yaml-cpp-config.cmake" @ONLY)
+
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/yaml-cpp-config-version.cmake.in
"${PROJECT_BINARY_DIR}/yaml-cpp-config-version.cmake" @ONLY)
+install(FILES
+ "${PROJECT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/yaml-cpp-config.cmake"
+ "${PROJECT_BINARY_DIR}/yaml-cpp-config-version.cmake"
+ DESTINATION "${INSTALL_CMAKE_DIR}" COMPONENT dev)
+install(EXPORT yaml-cpp-targets DESTINATION ${INSTALL_CMAKE_DIR})
+
if(UNIX)
set(PC_FILE ${CMAKE_BINARY_DIR}/yaml-cpp.pc)
configure_file("yaml-cpp.pc.cmake" ${PC_FILE} @ONLY)

View File

@ -0,0 +1,22 @@
# Description: YAML ayrıştırıcı ve yayıcı C ++, YAML 1.2 spesifikasyonu etrafında yazılmıştır
# URL: https://github.com/jbeder/yaml-cpp
# Packager: Cihan Alkan
# Depends on: boost cmake
name=yaml-cpp
version=0.5.3
release=1
source=(https://github.com/jbeder/yaml-cpp/archive/release-$version.tar.gz
500db60f899ae6845039d4eca503133d0db81dbd.patch
1f4b6d5c855b59e849b7228090981c520928c2a4.patch)
build() {
cd yaml-cpp-release-$version
patch -Np1 < $SRC/500db60f899ae6845039d4eca503133d0db81dbd.patch
patch -Np1 < $SRC/1f4b6d5c855b59e849b7228090981c520928c2a4.patch
cmake . -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=ON
make
make DESTDIR=$PKG install
}