execute_process(COMMAND "@INSTALL_SCRIPT@" RESULT_VARIABLE res)

if(NOT res EQUAL 0)
  message(FATAL_ERROR "execute_process(@INSTALL_SCRIPT@) returned error code ${res}")
endif()
