OpenMiInk/third_party/krita-deps-management/cmake/run-make-with-destdir.cmake
Hellings b8c8ff98e2 Hi
2026-10-16 09:05:56 -04:00

16 lines
No EOL
439 B
CMake

if (DEFINED ENV{DESTDIR})
set(DESTDIR_ARGS "DESTDIR=$ENV{DESTDIR}")
endif()
foreach(i RANGE 0 ${CMAKE_ARGC})
if ("${CMAKE_ARGV${i}}" STREQUAL "--")
set(FOUND_SEPARATOR TRUE)
elseif (FOUND_SEPARATOR)
list(APPEND EXTRA_ARGS ${CMAKE_ARGV${i}})
endif()
endforeach()
exec_program(make ARGS ${DESTDIR_ARGS} ${EXTRA_ARGS} RETURN_VALUE RETVAL)
if (RETVAL)
message(FATAL_ERROR "failed to execute make")
endif()