CMakeOBJCLinkerInformation.cmake 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. # file Copyright.txt or https://cmake.org/licensing for details.
  3. # This file sets the basic flags for the linker used by the Objective-C compiler in CMake.
  4. # It also loads the available platform file for the system-linker
  5. # if it exists.
  6. # It also loads a system - linker - processor (or target hardware)
  7. # specific file, which is mainly useful for crosscompiling and embedded systems.
  8. include(Internal/CMakeCommonLinkerInformation)
  9. set(_INCLUDED_FILE 0)
  10. # Load linker-specific information.
  11. if(CMAKE_OBJC_COMPILER_LINKER_ID)
  12. include(Linker/${CMAKE_OBJC_COMPILER_LINKER_ID}-OBJC OPTIONAL)
  13. endif()
  14. # load a hardware specific file, mostly useful for embedded compilers
  15. if(CMAKE_SYSTEM_PROCESSOR AND CMAKE_OBJC_COMPILER_LINKER_ID)
  16. include(Platform/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_OBJC_COMPILER_LINKER_ID}-OBJC-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
  17. endif()
  18. # load the system- and linker specific files
  19. if(CMAKE_OBJC_COMPILER_LINKER_ID)
  20. include(Platform/Linker/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_OBJC_COMPILER_LINKER_ID}-OBJC
  21. OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
  22. endif()
  23. # We specify the platform linker information in the system file.
  24. if (NOT _INCLUDED_FILE)
  25. include(Platform/Linker/${CMAKE_EFFECTIVE_SYSTEM_NAME}-OBJC OPTIONAL)
  26. endif ()
  27. _cmake_common_linker_platform_flags(OBJC)
  28. set(CMAKE_OBJC_LINKER_INFORMATION_LOADED 1)