Fuchsia.cmake 1.2 KB

12345678910111213141516171819202122232425262728
  1. set(FUCHSIA 1)
  2. set(CMAKE_DL_LIBS "")
  3. set(CMAKE_C_COMPILE_OPTIONS_PIC "-fPIC")
  4. set(CMAKE_C_COMPILE_OPTIONS_PIE "-fPIE")
  5. set(_CMAKE_C_PIE_MAY_BE_SUPPORTED_BY_LINKER YES)
  6. set(CMAKE_C_LINK_OPTIONS_PIE ${CMAKE_C_COMPILE_OPTIONS_PIE} "-pie")
  7. set(CMAKE_C_LINK_OPTIONS_NO_PIE "-no-pie")
  8. set(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC")
  9. set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared")
  10. set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG "-Wl,-rpath,")
  11. set(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":")
  12. set(CMAKE_SHARED_LIBRARY_RPATH_LINK_C_FLAG "-Wl,-rpath-link,")
  13. set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
  14. set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
  15. # Shared libraries with no builtin soname may not be linked safely by
  16. # specifying the file path.
  17. set(CMAKE_PLATFORM_USES_PATH_WHEN_NO_SONAME 1)
  18. # Initialize C link type selection flags. These flags are used when
  19. # building a shared library, shared module, or executable that links
  20. # to other libraries to select whether to use the static or shared
  21. # versions of the libraries.
  22. foreach(type SHARED_LIBRARY SHARED_MODULE EXE)
  23. set(CMAKE_${type}_LINK_STATIC_C_FLAGS "-Wl,-Bstatic")
  24. set(CMAKE_${type}_LINK_DYNAMIC_C_FLAGS "-Wl,-Bdynamic")
  25. endforeach()