FrameworkMultiConfigPostfix-build-final-check.cmake 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. include("${RunCMake_TEST_BINARY_DIR}/FrameworkMultiConfigPostfixInfo.cmake")
  2. get_filename_component(framework_location "${framework_dir}" DIRECTORY)
  3. set(non_existent_debug_framework_dir "${framework_location}/${target_file_name}_debug.framework")
  4. set(framework_resources "${framework_dir}/Resources")
  5. set(plist_file "${framework_resources}/Info.plist")
  6. set(symlink_release_path "${framework_dir}/${target_file_name}")
  7. set(framework_release_path "${framework_dir}/Versions/A/${target_file_name}")
  8. # When using a multi config generator (like Ninja Multi-Config and Xcode),
  9. # the postfix will be applied to the debug framework library name and the symlink name.
  10. # For single config generators, the name stays the same as the the release framework.
  11. if(is_multi_config)
  12. set(symlink_debug_path "${framework_dir}/${target_file_name}_debug")
  13. set(framework_debug_path "${framework_dir}/Versions/A/${target_file_name}_debug")
  14. else()
  15. set(symlink_debug_path "${framework_dir}/${target_file_name}")
  16. set(framework_debug_path "${framework_dir}/Versions/A/${target_file_name}")
  17. endif()
  18. if(NOT IS_DIRECTORY ${framework_dir})
  19. message(SEND_ERROR "Framework dir not found at ${framework_dir}")
  20. endif()
  21. if(IS_DIRECTORY ${non_existent_debug_framework_dir})
  22. message(SEND_ERROR
  23. "A framework dir with a debug suffix should not exist at ${non_existent_debug_framework_dir}")
  24. endif()
  25. if(NOT IS_SYMLINK "${symlink_release_path}")
  26. message(SEND_ERROR "Release framework symlink not found at ${symlink_release_path}")
  27. endif()
  28. if(NOT IS_SYMLINK "${symlink_debug_path}")
  29. message(SEND_ERROR "Debug framework symlink not found at ${symlink_debug_path}")
  30. endif()
  31. if(NOT EXISTS "${framework_release_path}")
  32. message(SEND_ERROR "Release framework not found at ${framework_release_path}")
  33. endif()
  34. if(NOT EXISTS "${framework_debug_path}")
  35. message(SEND_ERROR "Debug framework not found at ${framework_debug_path}")
  36. endif()