1
0
mirror of synced 2025-01-18 00:56:49 +01:00

build: Handle install prefix being absolute when installing sdk package

This commit is contained in:
WerWolv 2024-02-25 01:27:48 +01:00
parent afede0ff9c
commit d551e39a1c

View File

@ -755,7 +755,11 @@ function(generateSDKDirectory)
install(TARGETS libimhex ARCHIVE DESTINATION "${SDK_BUILD_PATH}/lib")
if ("$ENV{DESTDIR}" STREQUAL "")
set(SDK_INSTALL_PATH "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_PREFIX}/sdk")
if (IS_ABSOLUTE "${CMAKE_INSTALL_PREFIX}")
set(SDK_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/sdk")
else()
set(SDK_INSTALL_PATH "${CMAKE_BINARY_DIR}/${CMAKE_INSTALL_PREFIX}/sdk")
endif()
else()
set(SDK_INSTALL_PATH "$ENV{DESTDIR}/sdk")
endif()