InstallScript2.cmake 561 B

1234567891011121314
  1. MESSAGE("This is install script 2.")
  2. IF(INSTALL_SCRIPT_1_DID_RUN)
  3. MESSAGE("Install script ordering works.")
  4. ELSE(INSTALL_SCRIPT_1_DID_RUN)
  5. MESSAGE(FATAL_ERROR "Install script 1 did not run before install script 2.")
  6. ENDIF(INSTALL_SCRIPT_1_DID_RUN)
  7. IF(INSTALL_CODE_DID_RUN)
  8. MESSAGE("Install code ordering works.")
  9. ELSE(INSTALL_CODE_DID_RUN)
  10. MESSAGE(FATAL_ERROR "Install script 2 did not run after install code.")
  11. ENDIF(INSTALL_CODE_DID_RUN)
  12. FILE(WRITE "${CMAKE_INSTALL_PREFIX}/MyTest/InstallScriptOut.cmake"
  13. "SET(CMAKE_INSTALL_SCRIPT_DID_RUN 1)\n"
  14. )