Fix explicit CMAKE_INSTALL_PREFIX usages (#5500)

This commit is contained in:
Fabian Keßler 2024-10-01 19:38:16 +02:00 committed by GitHub
parent 03012da11c
commit 39143cc15a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 7 deletions

View File

@ -28,7 +28,8 @@ option(
find_package(Python3 COMPONENTS Interpreter) find_package(Python3 COMPONENTS Interpreter)
set(PYTHON3 ${Python3_EXECUTABLE}) set(PYTHON3 ${Python3_EXECUTABLE})
set(CMAKE_INSTALL_DATADIR ${CMAKE_INSTALL_PREFIX}) # See also CMake built-in; CMAKE_INSTALL_PREFIX is applied by the install command.
set(CMAKE_INSTALL_DATADIR .)
include(GNUInstallDirs) include(GNUInstallDirs)
include(CMakePackageConfigHelpers) include(CMakePackageConfigHelpers)
include(CheckStructHasMember) include(CheckStructHasMember)
@ -115,33 +116,33 @@ configure_file(include/verilated.mk.in include/verilated.mk @ONLY)
install( install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/include/verilated_config.h FILES ${CMAKE_CURRENT_BINARY_DIR}/include/verilated_config.h
DESTINATION ${CMAKE_INSTALL_PREFIX}/include DESTINATION include
) )
install( install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/include/verilated.mk FILES ${CMAKE_CURRENT_BINARY_DIR}/include/verilated.mk
DESTINATION ${CMAKE_INSTALL_PREFIX}/include DESTINATION include
) )
configure_package_config_file( configure_package_config_file(
verilator-config.cmake.in verilator-config.cmake.in
verilator-config.cmake verilator-config.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_PREFIX} INSTALL_DESTINATION .
) )
install( install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/verilator-config.cmake FILES ${CMAKE_CURRENT_BINARY_DIR}/verilator-config.cmake
DESTINATION ${CMAKE_INSTALL_PREFIX} DESTINATION .
) )
configure_package_config_file( configure_package_config_file(
verilator-config-version.cmake.in verilator-config-version.cmake.in
verilator-config-version.cmake verilator-config-version.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_PREFIX} INSTALL_DESTINATION .
) )
install( install(
FILES ${CMAKE_CURRENT_BINARY_DIR}/verilator-config-version.cmake FILES ${CMAKE_CURRENT_BINARY_DIR}/verilator-config-version.cmake
DESTINATION ${CMAKE_INSTALL_PREFIX} DESTINATION .
) )
foreach( foreach(

View File

@ -47,6 +47,7 @@ Edgar E. Iglesias
Eric Rippey Eric Rippey
Ethan Sifferman Ethan Sifferman
Eyck Jentzsch Eyck Jentzsch
Fabian Keßler
Fan Shupei Fan Shupei
february cozzocrea february cozzocrea
Felix Neumärker Felix Neumärker