2021-10-06 17:33:09 +00:00
|
|
|
diff --git a/build/cmake/aom_install.cmake b/build/cmake/aom_install.cmake
|
|
|
|
index 0bd2bf035..5cf5acea8 100644
|
2020-05-22 09:17:18 +00:00
|
|
|
--- a/build/cmake/aom_install.cmake
|
|
|
|
+++ b/build/cmake/aom_install.cmake
|
2021-10-06 17:33:09 +00:00
|
|
|
@@ -42,8 +42,8 @@ macro(setup_aom_install_targets)
|
|
|
|
-DAOM_ROOT=${AOM_ROOT}
|
|
|
|
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}
|
|
|
|
-DCMAKE_INSTALL_BINDIR=${CMAKE_INSTALL_BINDIR}
|
2020-05-22 09:17:18 +00:00
|
|
|
- -DCMAKE_INSTALL_INCLUDEDIR=${CMAKE_INSTALL_INCLUDEDIR}
|
|
|
|
- -DCMAKE_INSTALL_LIBDIR=${CMAKE_INSTALL_LIBDIR}
|
|
|
|
+ -DCMAKE_INSTALL_FULL_INCLUDEDIR=${CMAKE_INSTALL_FULL_INCLUDEDIR}
|
|
|
|
+ -DCMAKE_INSTALL_FULL_LIBDIR=${CMAKE_INSTALL_FULL_LIBDIR}
|
2021-10-06 17:33:09 +00:00
|
|
|
-DCMAKE_PROJECT_NAME=${CMAKE_PROJECT_NAME}
|
|
|
|
-DCONFIG_MULTITHREAD=${CONFIG_MULTITHREAD}
|
|
|
|
-DCONFIG_TUNE_VMAF=${CONFIG_TUNE_VMAF}
|
|
|
|
@@ -84,12 +84,12 @@ macro(setup_aom_install_targets)
|
|
|
|
# Setup the install rules. install() will automatically prepend
|
|
|
|
# CMAKE_INSTALL_PREFIX to relative paths
|
|
|
|
install(FILES ${AOM_INSTALL_INCS}
|
|
|
|
- DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/aom")
|
|
|
|
+ DESTINATION "${CMAKE_INSTALL_FULL_INCLUDEDIR}/aom")
|
|
|
|
install(FILES "${AOM_PKG_CONFIG_FILE}"
|
|
|
|
- DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
|
|
|
|
+ DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}/pkgconfig")
|
|
|
|
install(TARGETS ${AOM_INSTALL_LIBS};${AOM_INSTALL_BINS}
|
|
|
|
- RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
|
|
|
- LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
|
|
|
- ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}")
|
|
|
|
+ RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}"
|
|
|
|
+ LIBRARY DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}"
|
|
|
|
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_FULL_LIBDIR}")
|
2020-05-22 09:17:18 +00:00
|
|
|
endif()
|
2021-10-06 17:33:09 +00:00
|
|
|
endmacro()
|
|
|
|
diff --git a/build/cmake/pkg_config.cmake b/build/cmake/pkg_config.cmake
|
|
|
|
index e8fff2e77..b8a73aad4 100644
|
2020-05-22 09:17:18 +00:00
|
|
|
--- a/build/cmake/pkg_config.cmake
|
|
|
|
+++ b/build/cmake/pkg_config.cmake
|
2021-10-06 17:33:09 +00:00
|
|
|
@@ -11,8 +11,8 @@
|
|
|
|
cmake_minimum_required(VERSION 3.5)
|
|
|
|
|
|
|
|
set(REQUIRED_ARGS "AOM_ROOT" "AOM_CONFIG_DIR" "CMAKE_INSTALL_PREFIX"
|
2020-05-22 09:17:18 +00:00
|
|
|
- "CMAKE_INSTALL_BINDIR" "CMAKE_INSTALL_INCLUDEDIR"
|
|
|
|
- "CMAKE_INSTALL_LIBDIR" "CMAKE_PROJECT_NAME"
|
|
|
|
+ "CMAKE_INSTALL_BINDIR" "CMAKE_INSTALL_FULL_INCLUDEDIR"
|
|
|
|
+ "CMAKE_INSTALL_FULL_LIBDIR" "CMAKE_PROJECT_NAME"
|
2023-12-07 12:55:56 +00:00
|
|
|
"CONFIG_MULTITHREAD")
|
2021-10-06 17:33:09 +00:00
|
|
|
|
|
|
|
foreach(arg ${REQUIRED_ARGS})
|
|
|
|
@@ -35,15 +35,15 @@ else()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# Write pkg-config info.
|
2020-05-22 09:17:18 +00:00
|
|
|
-set(prefix "${CMAKE_INSTALL_PREFIX}")
|
|
|
|
-set(bindir "${CMAKE_INSTALL_BINDIR}")
|
|
|
|
-set(includedir "${CMAKE_INSTALL_INCLUDEDIR}")
|
|
|
|
-set(libdir "${CMAKE_INSTALL_LIBDIR}")
|
|
|
|
+get_filename_component(prefix "${CMAKE_INSTALL_FULL_INCLUDEDIR}" DIRECTORY)
|
|
|
|
+get_filename_component(exec_prefix "${CMAKE_INSTALL_FULL_LIBDIR}" DIRECTORY)
|
|
|
|
+get_filename_component(includedir "${CMAKE_INSTALL_FULL_INCLUDEDIR}" NAME)
|
|
|
|
+get_filename_component(libdir "${CMAKE_INSTALL_FULL_LIBDIR}" NAME)
|
2021-10-06 17:33:09 +00:00
|
|
|
set(pkgconfig_file "${AOM_CONFIG_DIR}/aom.pc")
|
|
|
|
string(TOLOWER ${CMAKE_PROJECT_NAME} pkg_name)
|
|
|
|
file(WRITE "${pkgconfig_file}" "# libaom pkg-config.\n")
|
|
|
|
file(APPEND "${pkgconfig_file}" "prefix=${prefix}\n")
|
2020-05-22 09:17:18 +00:00
|
|
|
-file(APPEND "${pkgconfig_file}" "exec_prefix=\${prefix}\n")
|
|
|
|
+file(APPEND "${pkgconfig_file}" "exec_prefix=${exec_prefix}\n")
|
2021-10-06 17:33:09 +00:00
|
|
|
file(APPEND "${pkgconfig_file}" "includedir=\${prefix}/${includedir}\n")
|
|
|
|
file(APPEND "${pkgconfig_file}" "libdir=\${exec_prefix}/${libdir}\n\n")
|
|
|
|
file(APPEND "${pkgconfig_file}" "Name: ${pkg_name}\n")
|