Commit 8ac0364a authored by Simon Morlat's avatar Simon Morlat

Merge branch 'fix/rpm' into 'master'

Fix rpm.

See merge request !12
parents 374041a9 fc884829
......@@ -128,7 +128,7 @@ endif()
include(CMakePackageConfigHelpers)
set(EXPORT_TARGET_NAME belr)
set(ConfigPackageLocation share/${EXPORT_TARGET_NAME}/cmake)
set(ConfigPackageLocation "${CMAKE_INSTALL_LIBDIR}/cmake/${EXPORT_TARGET_NAME}")
export(EXPORT ${EXPORT_TARGET_NAME}Targets
FILE "${CMAKE_CURRENT_BINARY_DIR}/${EXPORT_TARGET_NAME}Targets.cmake"
......@@ -144,6 +144,8 @@ install(EXPORT ${EXPORT_TARGET_NAME}Targets
FILE ${EXPORT_TARGET_NAME}Targets.cmake
DESTINATION ${ConfigPackageLocation}
)
#Yes, an install directive is necessary. The INSTALL_DESTINATION parameter of configure_package_config_file() above does NOTHING.
install(FILES
"${CMAKE_CURRENT_BINARY_DIR}/${EXPORT_TARGET_NAME}Config.cmake"
DESTINATION ${ConfigPackageLocation}
......
......@@ -98,8 +98,8 @@ rm -rf $RPM_BUILD_ROOT
%if @ENABLE_SHARED@
%{_libdir}/libbelr.so
%endif
%{_datadir}/Belr/cmake/BelrConfig*.cmake
%{_datadir}/Belr/cmake/BelrTargets*.cmake
%{_libdir}/cmake/belr/belrConfig*.cmake
%{_libdir}/cmake/belr/belrTargets*.cmake
%if @ENABLE_TESTS@ || @ENABLE_TOOLS@
%{_bindir}/*
%endif
......
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