InstallScript4.cmake 777 B

12345678910111213141516171819202122
  1. message("This is install script 4.")
  2. if(INSTALL_SCRIPT_3_DID_RUN)
  3. message("Install script ordering works.")
  4. else()
  5. message(FATAL_ERROR "Install script 3 did not run before install script 4.")
  6. endif()
  7. if(INSTALL_CODE_WITH_COMPONENT_DID_RUN)
  8. message("Install code ordering works.")
  9. else()
  10. message(FATAL_ERROR "Install script 4 did not run after install with component code.")
  11. endif()
  12. if(CMAKE_INSTALL_COMPONENT)
  13. if(NOT "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Development")
  14. message("CMAKE_INSTALL_COMPONENT=\"${CMAKE_INSTALL_COMPONENT}\"")
  15. message(FATAL_ERROR "Install script 4 should only run for \"Development\" INSTALL COMPONENT.")
  16. endif()
  17. endif()
  18. file(WRITE "${CMAKE_INSTALL_PREFIX}/MyTest/InstallScript4Out.cmake"
  19. "set(CMAKE_INSTALL_SCRIPT_4_DID_RUN 1)\n"
  20. )