Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / libraries / geogram / fix-cmake-install-destination.patch
blob1dba488e8de31e3664640f20f2a79907f459e6c5
1 --- a/cmake/utilities.cmake 1970-01-01 01:00:01.000000000 +0100
2 +++ b/cmake/utilities.cmake 2023-03-09 19:28:16.556251981 +0100
3 @@ -241,9 +241,9 @@
4 install(
5 TARGETS ${ARGN}
6 COMPONENT runtime
7 - RUNTIME DESTINATION bin
8 - LIBRARY DESTINATION lib
9 - ARCHIVE DESTINATION lib
10 + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
11 + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
12 + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
14 endfunction()
16 @@ -270,9 +270,9 @@
17 install(
18 TARGETS ${ARGN}
19 COMPONENT ${component}
20 - RUNTIME DESTINATION bin
21 - LIBRARY DESTINATION lib
22 - ARCHIVE DESTINATION lib
23 + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
24 + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
25 + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
27 endforeach()
28 endfunction()
29 --- a/src/lib/geogram/CMakeLists.txt 1970-01-01 01:00:01.000000000 +0100
30 +++ b/src/lib/geogram/CMakeLists.txt 2023-03-09 20:29:12.346780432 +0100
31 @@ -76,7 +76,7 @@
32 # Install include files for the standard devkit
33 install(
34 DIRECTORY api
35 - DESTINATION include/${VORPALINE_INCLUDE_SUBPATH}/geogram
36 + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${VORPALINE_INCLUDE_SUBPATH}/geogram
37 COMPONENT devkit
38 FILES_MATCHING PATTERN *.h
40 @@ -84,7 +84,7 @@
41 # Install include files for the full devkit
42 install(
43 DIRECTORY .
44 - DESTINATION include/${VORPALINE_INCLUDE_SUBPATH}/geogram
45 + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${VORPALINE_INCLUDE_SUBPATH}/geogram
46 COMPONENT devkit-full
47 FILES_MATCHING PATTERN *.h
48 # Exclude all files related to licensing
49 @@ -93,7 +93,7 @@
51 install(
52 FILES "${PROJECT_BINARY_DIR}/geogram${VORPALINE_VERSION_MAJOR}.pc"
53 - DESTINATION lib${LIB_SUFFIX}/pkgconfig
54 + DESTINATION ${GEOGRAM_INSTALL_PKGCONFIG_DIR}
58 --- a/CMakeLists.txt 1970-01-01 01:00:01.000000000 +0100
59 +++ b/CMakeLists.txt 2023-03-09 20:40:20.075218356 +0100
60 @@ -158,7 +158,7 @@
62 # FindGeogram.cmake
64 -install(FILES cmake/FindGeogram.cmake DESTINATION lib/cmake/modules COMPONENT devkit)
65 +install(FILES cmake/FindGeogram.cmake DESTINATION ${GEOGRAM_INSTALL_CMAKE_DIR} COMPONENT devkit)
67 # Configure CPack
69 --- a/doc/CMakeLists.txt 1970-01-01 01:00:01.000000000 +0100
70 +++ b/doc/CMakeLists.txt 2023-03-09 21:12:04.386327003 +0100
71 @@ -25,14 +25,14 @@
73 # Install documentation
74 if(GEOGRAM_WITH_VORPALINE)
75 - install(FILES README.txt DESTINATION doc COMPONENT runtime)
76 - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt DESTINATION doc COMPONENT runtime OPTIONAL)
77 + install(FILES README.txt DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT runtime)
78 + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/LICENSE.txt DESTINATION ${CMAKE_INSTALL_DOCDIR} COMPONENT runtime OPTIONAL)
79 endif()
81 - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION.txt DESTINATION doc/geogram COMPONENT runtime OPTIONAL)
83 - install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/devkit/html DESTINATION doc/devkit COMPONENT doc-devkit OPTIONAL)
84 - install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/devkit-full/html DESTINATION doc/devkit COMPONENT doc-devkit-full OPTIONAL)
85 - install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/devkit-internal/html DESTINATION doc/devkit COMPONENT doc-devkit-internal OPTIONAL)
86 + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/VERSION.txt DESTINATION ${CMAKE_INSTALL_DOCDIR}/geogram COMPONENT runtime OPTIONAL)
88 + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/devkit/html DESTINATION ${CMAKE_INSTALL_DOCDIR}/devkit COMPONENT doc-devkit OPTIONAL)
89 + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/devkit-full/html DESTINATION ${CMAKE_INSTALL_DOCDIR}/devkit COMPONENT doc-devkit-full OPTIONAL)
90 + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/devkit-internal/html DESTINATION ${CMAKE_INSTALL_DOCDIR}/devkit COMPONENT doc-devkit-internal OPTIONAL)
92 endif()