Commit 954e33b9 authored by Simon Morlat's avatar Simon Morlat

Fix specfile and install cmake config files into the correct path.

parent b81103a1
......@@ -225,16 +225,19 @@ endif()
include(CMakePackageConfigHelpers)
set(CONFIG_PACKAGE_LOCATION "${CMAKE_INSTALL_DATADIR}/BelleSIP/cmake")
set(CONFIG_PACKAGE_LOCATION "${CMAKE_INSTALL_LIBDIR}/cmake/BelleSIP")
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/BelleSIPConfigVersion.cmake"
VERSION ${PACKAGE_VERSION}
COMPATIBILITY AnyNewerVersion
)
export(EXPORT ${EXPORT_TARGETS_NAME}Targets
FILE "${CMAKE_CURRENT_BINARY_DIR}/BelleSIPTargets.cmake"
)
configure_package_config_file(cmake/BelleSIPConfig.cmake.in
"${CMAKE_CURRENT_BINARY_DIR}/BelleSIPConfig.cmake"
INSTALL_DESTINATION ${CONFIG_PACKAGE_LOCATION}
......@@ -245,6 +248,8 @@ install(EXPORT ${EXPORT_TARGETS_NAME}Targets
FILE BelleSIPTargets.cmake
DESTINATION ${CONFIG_PACKAGE_LOCATION}
)
#Yes, an install directive is necessary. The INSTALL_DESTINATION parameter of configure_package_config_file() above does NOTHING.
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/BelleSIPConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/BelleSIPConfigVersion.cmake"
......
......@@ -21,7 +21,7 @@ Summary: Linphone's sip stack
Group: Applications/Communications
License: GPL
URL: http://www.belle-sip.org
Source0: %{name}-%{version}-%{build_number}.tar.gz
Source0: %{name}-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot
Requires: %{pkg_prefix}bctoolbox
......@@ -51,7 +51,7 @@ Libraries and headers required to develop software with belle-sip
%custom_debug_package
%prep
%setup -n %{name}-%{version}-%build_number
%setup -n %{name}-%{version}
%build
%{expand:%%%cmake_name} . -DCMAKE_BUILD_TYPE=@CMAKE_BUILD_TYPE@ -DCMAKE_PREFIX_PATH:PATH=%{_prefix} @RPM_ALL_CMAKE_OPTIONS@
......@@ -78,7 +78,7 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root)
%doc AUTHORS.md CHANGELOG.md LICENSE.md README.md
%doc AUTHORS.md CHANGELOG.md LICENSE.txt README.md
%{_libdir}/*.so.*
%files devel
......@@ -91,8 +91,8 @@ rm -rf $RPM_BUILD_ROOT
%{_libdir}/libbellesip.so
%endif
%{_libdir}/pkgconfig/belle-sip.pc
%{_datadir}/BelleSIP/cmake/BelleSIPConfig*.cmake
%{_datadir}/BelleSIP/cmake/BelleSIPTargets*.cmake
%{_libdir}/cmake/BelleSIP/BelleSIPConfig*.cmake
%{_libdir}/cmake/BelleSIP/BelleSIPTargets*.cmake
%changelog
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment