[PATCH 1/2] use GNUInstallDirs for automatic Multi-Arch support
Gbp-Pq: Name 0001-use-GNUInstallDirs-for-automatic-Multi-Arch-support.patch
This commit is contained in:
parent
dd4f4598c1
commit
308e3467e3
|
@ -58,6 +58,11 @@ set(HEADERS src/frameinfo.h src/transformtype.h src/libvidstab.h
|
|||
src/transform.h src/motiondetect.h src/serialize.h
|
||||
src/localmotion2transform.h src/boxblur.h src/vsvector.h )
|
||||
|
||||
# Installation paths
|
||||
include(GNUInstallDirs)
|
||||
set(BIN_INSTALL_DIR "${CMAKE_INSTALL_BINDIR}" CACHE STRING "Relative installation path for binaries.")
|
||||
set(LIB_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}" CACHE STRING "Relative installation path for libraries.")
|
||||
set(INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}" CACHE STRING "Relative installation path for headers.")
|
||||
|
||||
# Create the vidstab library
|
||||
add_library (vidstab ${SOURCES})
|
||||
|
@ -80,13 +85,13 @@ endif()
|
|||
|
||||
#if(!NOHEADERS)
|
||||
FILE(GLOB HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/src/*.h")
|
||||
INSTALL(FILES ${HEADERS} DESTINATION include/vid.stab)
|
||||
INSTALL(FILES ${HEADERS} DESTINATION ${INCLUDE_INSTALL_DIR}/vid.stab)
|
||||
#endif()
|
||||
|
||||
INSTALL(TARGETS vidstab
|
||||
RUNTIME DESTINATION bin
|
||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
||||
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
|
||||
LIBRARY DESTINATION ${LIB_INSTALL_DIR}
|
||||
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
|
||||
)
|
||||
|
||||
include(create_pkgconfig_file)
|
||||
|
|
|
@ -10,8 +10,8 @@ macro (create_pkgconfig_file name desc)
|
|||
|
||||
file(WRITE "${_pkgfname}" "# file generated by vid.stab cmake build
|
||||
prefix=${CMAKE_INSTALL_PREFIX}
|
||||
libdir=\${prefix}/lib${LIB_SUFFIX}
|
||||
includedir=\${prefix}/include
|
||||
libdir=\${prefix}/${LIB_INSTALL_DIR}
|
||||
includedir=\${prefix}/${INCLUDE_INSTALL_DIR}
|
||||
|
||||
Name: ${name}
|
||||
Description: ${desc}
|
||||
|
@ -21,5 +21,5 @@ Cflags: -I\${includedir}
|
|||
|
||||
")
|
||||
|
||||
install(FILES ${_pkgfname} DESTINATION lib${LIB_SUFFIX}/pkgconfig)
|
||||
endmacro()
|
||||
install(FILES ${_pkgfname} DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
|
||||
endmacro()
|
||||
|
|
Loading…
Reference in New Issue