aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim de With <wf@dewith.io>2024-01-28 11:05:15 +0100
committerDamjan Marion <dmarion@0xa5.net>2024-04-10 13:59:41 +0000
commitf521df72005cc8e995e908175392b183083568c8 (patch)
treed0c41a6bf245e6020900754183e0efc987c414ed
parenta447c66e558c7526d9ed04878d27d0f32127ed2f (diff)
build: use GNUInstallDirs where possible
Some installation destinations were already converted to the GNUInstallDirs standard in e3cf4d0cf. This patch converts the share and include directories (typically /usr/share and /usr/include respectively) as well. Type: improvement Change-Id: Id481b16604f3f52203166a5c0647f43d6eb05239 Signed-off-by: Wim de With <wf@dewith.io>
-rw-r--r--src/cmake/api.cmake6
-rw-r--r--src/cmake/library.cmake6
-rw-r--r--src/cmake/plugin.cmake4
-rw-r--r--src/tools/appimage/CMakeLists.txt2
-rw-r--r--src/tools/vppapigen/CMakeLists.txt2
-rw-r--r--src/vpp-api/vapi/CMakeLists.txt2
6 files changed, 11 insertions, 11 deletions
diff --git a/src/cmake/api.cmake b/src/cmake/api.cmake
index 0e273a7d4dc..10e89d77594 100644
--- a/src/cmake/api.cmake
+++ b/src/cmake/api.cmake
@@ -70,7 +70,7 @@ function(vpp_generate_api_json_header file dir component)
)
install(
FILES ${output_name}
- DESTINATION share/vpp/api/${dir}/
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/vpp/api/${dir}/
COMPONENT ${component}
)
endfunction()
@@ -101,7 +101,7 @@ function(vpp_generate_vapi_c_header f)
)
install(
FILES ${output_name}
- DESTINATION include/vapi
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/vapi
COMPONENT vpp-dev
)
endfunction ()
@@ -128,7 +128,7 @@ function (vpp_generate_vapi_cpp_header f)
)
install(
FILES ${output_name}
- DESTINATION include/vapi
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/vapi
COMPONENT vpp-dev
)
endfunction ()
diff --git a/src/cmake/library.cmake b/src/cmake/library.cmake
index 45b3944eb34..a06a795c69f 100644
--- a/src/cmake/library.cmake
+++ b/src/cmake/library.cmake
@@ -72,7 +72,7 @@ macro(add_vpp_library lib)
${CMAKE_CURRENT_BINARY_DIR}/${file}_types.h
${CMAKE_CURRENT_BINARY_DIR}/${file}_tojson.h
${CMAKE_CURRENT_BINARY_DIR}/${file}_fromjson.h
- DESTINATION include/${lib}/${dir}
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${lib}/${dir}
COMPONENT vpp-dev
)
endforeach()
@@ -96,7 +96,7 @@ macro(add_vpp_library lib)
get_filename_component(dir ${file} DIRECTORY)
install(
FILES ${file}
- DESTINATION include/${lib}/${dir}
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${lib}/${dir}
COMPONENT ${ARG_COMPONENT}-dev
)
endforeach()
@@ -111,7 +111,7 @@ function (add_vpp_headers path)
get_filename_component(dir ${file} DIRECTORY)
install(
FILES ${file}
- DESTINATION include/${path}/${dir}
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${path}/${dir}
COMPONENT vpp-dev
)
endforeach()
diff --git a/src/cmake/plugin.cmake b/src/cmake/plugin.cmake
index df96aa8765f..f971e5f1401 100644
--- a/src/cmake/plugin.cmake
+++ b/src/cmake/plugin.cmake
@@ -44,7 +44,7 @@ macro(add_vpp_plugin name)
${CMAKE_CURRENT_BINARY_DIR}/${f}.h
${CMAKE_CURRENT_BINARY_DIR}/${f}_enum.h
${CMAKE_CURRENT_BINARY_DIR}/${f}_types.h
- DESTINATION include/vpp_plugins/${name}/${dir}
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/vpp_plugins/${name}/${dir}
COMPONENT ${PLUGIN_DEV_COMPONENT}
)
endforeach()
@@ -86,7 +86,7 @@ macro(add_vpp_plugin name)
get_filename_component(dir ${file} DIRECTORY)
install(
FILES ${file}
- DESTINATION include/vpp_plugins/${name}/${dir}
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/vpp_plugins/${name}/${dir}
COMPONENT vpp-dev
)
endforeach()
diff --git a/src/tools/appimage/CMakeLists.txt b/src/tools/appimage/CMakeLists.txt
index 1b83656dbf8..26ef77d1c91 100644
--- a/src/tools/appimage/CMakeLists.txt
+++ b/src/tools/appimage/CMakeLists.txt
@@ -18,7 +18,7 @@ if(VPP_BUILD_APPIMAGE)
WORLD_READ WORLD_EXECUTE)
install(FILES vpp.desktop DESTINATION .)
install(FILES vpp.png DESTINATION .)
- install(FILES vpp.svg DESTINATION share/icons/hicolor/scalable/vpp.svg)
+ install(FILES vpp.svg DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/vpp.svg)
install(CODE "EXECUTE_PROCESS(COMMAND ln -s . ./usr
WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX})")
install(CODE "EXECUTE_PROCESS(
diff --git a/src/tools/vppapigen/CMakeLists.txt b/src/tools/vppapigen/CMakeLists.txt
index 04ebed54862..97a6d35f9b5 100644
--- a/src/tools/vppapigen/CMakeLists.txt
+++ b/src/tools/vppapigen/CMakeLists.txt
@@ -43,7 +43,7 @@ install(
vppapigen_json.py
generate_json.py
DESTINATION
- share/vpp
+ ${CMAKE_INSTALL_DATADIR}/vpp
COMPONENT
vpp-dev
)
diff --git a/src/vpp-api/vapi/CMakeLists.txt b/src/vpp-api/vapi/CMakeLists.txt
index e01692210bb..e53d3e8b238 100644
--- a/src/vpp-api/vapi/CMakeLists.txt
+++ b/src/vpp-api/vapi/CMakeLists.txt
@@ -45,7 +45,7 @@ install(
vapi_json_parser.py
vapi_cpp_gen.py
DESTINATION
- share/vpp
+ ${CMAKE_INSTALL_DATADIR}/vpp
COMPONENT
vpp-dev
)