FIND_PROGRAM(UNAME NAMES uname)
EXEC_PROGRAM("${UNAME}" ARGS "-m" OUTPUT_VARIABLE "ARCH")
IF("${ARCH}" MATCHES "^arm.*")
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/lib/arm/libvc-engine-default.so DESTINATION /usr/lib/voice/vc/1.0/engine/ COMPONENT RuntimeLibraries)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/lib/arm/libvc-engine-default.so DESTINATION ${LIBDIR}/voice/vc/1.0/engine/ COMPONENT RuntimeLibraries)
ELSEIF("${ARCH}" MATCHES "^i586.*")
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/lib/i586/libvc-engine-default.so DESTINATION /usr/lib/voice/vc/1.0/engine/ COMPONENT RuntimeLibraries)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/lib/i586/libvc-engine-default.so DESTINATION ${LIBDIR}/voice/vc/1.0/engine/ COMPONENT RuntimeLibraries)
ELSEIF("${ARCH}" MATCHES "^i686.*")
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/lib/i586/libvc-engine-default.so DESTINATION /usr/lib/voice/vc/1.0/engine/ COMPONENT RuntimeLibraries)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/lib/i586/libvc-engine-default.so DESTINATION ${LIBDIR}/voice/vc/1.0/engine/ COMPONENT RuntimeLibraries)
ELSEIF("${ARCH}" MATCHES "^aarch64.*")
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/lib/aarch64/libvc-engine-default.so DESTINATION /usr/lib/voice/vc/1.0/engine/ COMPONENT RuntimeLibraries)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/lib/aarch64/libvc-engine-default.so DESTINATION ${LIBDIR}/voice/vc/1.0/engine/ COMPONENT RuntimeLibraries)
ELSEIF("${ARCH}" MATCHES "^x86_64.*")
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/lib/x86_64/libvc-engine-default.so DESTINATION /usr/lib/voice/vc/1.0/engine/ COMPONENT RuntimeLibraries)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/lib/x86_64/libvc-engine-default.so DESTINATION ${LIBDIR}/voice/vc/1.0/engine/ COMPONENT RuntimeLibraries)
ENDIF()
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/engine_data/ DESTINATION /usr/share/voice/vc/engine_data)
-INSTALL(FILES ${CMAKE_SOURCE_DIR}/vc-default-info.xml DESTINATION /usr/lib/voice/vc/1.0/engine-info/)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/vc-default-info.xml DESTINATION ${LIBDIR}/voice/vc/1.0/engine-info/)
%files
%manifest vc-engine-default.manifest
%defattr(-,root,root,-)
-/usr/lib/voice/vc/1.0/engine/lib*.so
-/usr/lib/voice/vc/1.0/engine-info/vc-default-info.xml
+%{_libdir}/voice/vc/1.0/engine/lib*.so
+%{_libdir}/voice/vc/1.0/engine-info/vc-default-info.xml
/usr/share/voice/vc/engine_data/*
/usr/share/license/%{name}