Adds CMake configuration export commands to fix bug 575606
This commit is contained in:
parent
5bcbc99d9c
commit
5c7ccd86ab
5 changed files with 56 additions and 1 deletions
8
RPLYConfig.cmake.in
Normal file
8
RPLYConfig.cmake.in
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# The RPLY library directory.
|
||||
SET(RPLY_LIBRARY_DIR "@LIB_INSTALL_DIR@")
|
||||
SET(RPLY_INCLUDE_DIR "@INCLUDE_INSTALL_DIR@")
|
||||
SET(RPLY_LIBRARY "@RPLY_LIBRARY@")
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -1 +1,2 @@
|
|||
rply-1_01-2_fc12:HEAD:rply-1.01-2.fc12.src.rpm:1267876689
|
||||
rply-1_01-3_fc12:HEAD:rply-1.01-3.fc12.src.rpm:1269249281
|
||||
|
|
|
|||
15
rply.spec
15
rply.spec
|
|
@ -1,12 +1,14 @@
|
|||
Name: rply
|
||||
Version: 1.01
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Summary: A library to read and write PLY files
|
||||
Group: Development/Libraries
|
||||
License: MIT
|
||||
URL: http://www.tecgraf.puc-rio.br/~diego/professional/rply/
|
||||
Source0: http://www.tecgraf.puc-rio.br/~diego/professional/rply/rply-1.01.tar.gz
|
||||
Source1: rply_CMakeLists.txt
|
||||
Source2: RPLYConfig.cmake.in
|
||||
Source3: rply_cmake_export_cmakelists.txt
|
||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
|
||||
BuildRequires: cmake >= 2.6.0
|
||||
|
|
@ -32,6 +34,12 @@ efficient, and well tested. The highlights are:
|
|||
# Add CMakeLists.txt file
|
||||
cp %{SOURCE1} CMakeLists.txt
|
||||
|
||||
# Add CMake detection modules
|
||||
mkdir -p CMake/export
|
||||
mkdir -p CMake/Modules
|
||||
cp %{SOURCE2} CMake/Modules/
|
||||
cp %{SOURCE3} CMake/export/CMakeLists.txt
|
||||
|
||||
%build
|
||||
%cmake -DCMAKE_BUILD_TYPE:STRING="Release"\
|
||||
-DCMAKE_VERBOSE_MAKEFILE=ON .
|
||||
|
|
@ -73,8 +81,13 @@ Rply Library Header Files and Link Libraries
|
|||
%dir %{_includedir}/%{name}/
|
||||
%{_includedir}/%{name}/*
|
||||
%{_libdir}/*.so
|
||||
%dir %{_datadir}/%{name}/
|
||||
%{_datadir}/%{name}/rplyConfig.cmake
|
||||
|
||||
%changelog
|
||||
* Sun Mar 21 2010 Mario Ceresa mrceresa@gmail.com rply 1.01-3
|
||||
- Added CMake modules to detect the package
|
||||
|
||||
* Thu Mar 04 2010 Mario Ceresa mrceresa@gmail.com rply 1.01-2
|
||||
- Fixed problems detected in https://bugzilla.redhat.com/show_bug.cgi?id=570258#c2
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,9 @@ cmake_minimum_required(VERSION 2.6)
|
|||
SET(RPLY_LIB_MAJOR_VERSION 1)
|
||||
SET(RPLY_LIB_MINOR_VERSION 01)
|
||||
|
||||
SET(RPLY_CMAKE_DIR ${CMAKE_SOURCE_DIR}/CMake/ )
|
||||
SET(RPLY_LIBRARY librply.so )
|
||||
|
||||
add_library(rply SHARED rply.c )
|
||||
set_target_properties( rply PROPERTIES
|
||||
VERSION ${RPLY_LIB_MAJOR_VERSION}.${RPLY_LIB_MINOR_VERSION}
|
||||
|
|
@ -27,4 +30,8 @@ install(TARGETS rply_convert RUNTIME DESTINATION bin)
|
|||
install(TARGETS rply_dump RUNTIME DESTINATION bin)
|
||||
install(TARGETS rply_sconvert RUNTIME DESTINATION bin)
|
||||
|
||||
#This should be the last line of the project
|
||||
SUBDIRS( CMake/export )
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
26
rply_cmake_export_cmakelists.txt
Normal file
26
rply_cmake_export_cmakelists.txt
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# This CMakeLists.txt file handles the creation of files needed by
|
||||
# other client projects that use RPLY. Nothing is built by this
|
||||
# CMakeLists.txt file. This CMakeLists.txt file must be processed by
|
||||
# CMake after all the other CMakeLists.txt files in the RPLY tree,
|
||||
# which is why the SUBDIRS(CMake/export) command is at the end
|
||||
# of the top level CMakeLists.txt file.
|
||||
|
||||
# Save the compiler settings so another project can import them.
|
||||
INCLUDE(${CMAKE_ROOT}/Modules/CMakeExportBuildSettings.cmake)
|
||||
SET(RPLY_BUILD_SETTINGS_FILE ${rply_BINARY_DIR}/RPLYBuildSettings.cmake)
|
||||
SET(RPLY_EXPORT_BUILD_SETTINGS_FILE
|
||||
${CMAKE_INSTALL_PREFIX}/share/rply/cmake/RPLYBuildSettings.cmake
|
||||
)
|
||||
CMAKE_EXPORT_BUILD_SETTINGS(${RPLY_BUILD_SETTINGS_FILE})
|
||||
|
||||
# Create the VXLConfig.cmake file for the build tree.
|
||||
CONFIGURE_FILE(${RPLY_CMAKE_DIR}Modules/RPLYConfig.cmake.in
|
||||
${CMAKE_BINARY_DIR}/rplyConfig.cmake @ONLY IMMEDIATE)
|
||||
|
||||
INSTALL_FILES(/share/rply FILES
|
||||
${CMAKE_BINARY_DIR}/rplyConfig.cmake
|
||||
# ${RPLY_BINARY_DIR}/RPLYBuildSettings.cmake
|
||||
# ${RPLY_BINARY_DIR}/RPLYLibraryDepends.cmake
|
||||
# ${RPLY_CMAKE_DIR}/RPLYStandardOptions.cmake
|
||||
# ${RPLY_CMAKE_DIR}/UseRPLY.cmake
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue