[PATCH 2/3] src/CMakeLists.txt: Enable multiarch for the library
authorNobuhiro Iwamatsu <iwamatsu@debian.org>
Wed, 1 Jun 2022 02:23:22 +0000 (11:23 +0900)
committerNobuhiro Iwamatsu <iwamatsu@debian.org>
Sat, 6 Aug 2022 00:37:17 +0000 (01:37 +0100)
The library install path is hard coded which gets in the way of
enabling multiarch.

Fix this by respecting the standard CMAKE variable used to specify
library install location. This variable gets used during package
building to install the package to multiarch aware location.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@debian.org>
Gbp-Pq: Name 0002-src-CMakeLists.txt-Enable-multiarch-for-the-library.patch

src/CMakeLists.txt

index 66d13d26fe0ed08e81d04166c2e844a10ffa9377..e231dfdd78f6abfae55e409cf8537335bb90f799 100644 (file)
@@ -83,8 +83,8 @@ install(
   TARGETS ${PROJECT_NAME}
   EXPORT ${PROJECT_NAME}-targets
   RUNTIME DESTINATION bin
-  ARCHIVE DESTINATION lib
-  LIBRARY DESTINATION lib)
+  ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
+  LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
 install(
   FILES ${PROTO_HDRS} ${PROJECT_SOURCE_DIR}/include/vitis/ai/target_factory.hpp
   DESTINATION include/vitis/ai)