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