forked from pool/tvision
54 lines
1.7 KiB
Diff
54 lines
1.7 KiB
Diff
|
diff -ruN a/CMakeLists.txt b/CMakeLists.txt
|
||
|
--- a/CMakeLists.txt
|
||
|
+++ b/CMakeLists.txt
|
||
|
@@ -149,6 +149,8 @@
|
||
|
|
||
|
option(TV_BUILD_AVSCOLOR "Build AviSynth TermColor plugin" OFF)
|
||
|
|
||
|
+include(GNUInstallDirs)
|
||
|
+
|
||
|
tv_message_mp(STATUS "Install path: ${CMAKE_INSTALL_PREFIX}")
|
||
|
tv_message(STATUS "Build Examples: ${TV_BUILD_EXAMPLES}")
|
||
|
if (MAY_BUILD_USING_GPM)
|
||
|
diff -ruN a/examples/CMakeLists.txt b/examples/CMakeLists.txt
|
||
|
--- a/examples/CMakeLists.txt
|
||
|
+++ b/examples/CMakeLists.txt
|
||
|
@@ -25,7 +25,7 @@
|
||
|
# Until CMake 3.13, 'install' only accepts targets defined
|
||
|
# in the current directory. So install from this function.
|
||
|
if (${app} IN_LIST TVINSTALLAPPS)
|
||
|
- install(TARGETS ${app} RUNTIME DESTINATION bin)
|
||
|
+ install(TARGETS ${app} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||
|
endif()
|
||
|
endfunction()
|
||
|
|
||
|
diff -ruN a/source/CMakeLists.txt b/source/CMakeLists.txt
|
||
|
--- a/source/CMakeLists.txt
|
||
|
+++ b/source/CMakeLists.txt
|
||
|
@@ -153,14 +153,14 @@
|
||
|
#
|
||
|
install(TARGETS ${PROJECT_NAME}
|
||
|
EXPORT ${PROJECT_NAME}-config
|
||
|
- ARCHIVE DESTINATION lib
|
||
|
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||
|
COMPONENT library
|
||
|
)
|
||
|
|
||
|
# package configuration
|
||
|
|
||
|
install(EXPORT ${PROJECT_NAME}-config
|
||
|
- DESTINATION lib/cmake/${PROJECT_NAME}
|
||
|
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}
|
||
|
NAMESPACE ${PROJECT_NAME}::
|
||
|
FILE ${PROJECT_NAME}-config.cmake
|
||
|
COMPONENT library
|
||
|
@@ -169,7 +169,7 @@
|
||
|
# includes
|
||
|
# ./include/tvision and children copied to destination/include/tvision etc...
|
||
|
#
|
||
|
-install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/tvision" DESTINATION include)
|
||
|
+install(DIRECTORY "${PROJECT_SOURCE_DIR}/include/tvision" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||
|
|
||
|
# Build optimization
|
||
|
|