syllable.cmake 1.5 KB

123456789101112131415161718192021222324252627282930313233
  1. # this is the platform file for the Syllable OS (http://www.syllable.org)
  2. # Syllable is a free OS (GPL), which is mostly POSIX conform
  3. # the linker accepts the rpath related arguments, but this is later on
  4. # ignored by the runtime linker
  5. # shared libs are found exclusively via the environment variable DLL_PATH,
  6. # which may contain also dirs containing the special variable @bindir@
  7. # by default @bindir@/lib is part of DLL_PATH
  8. # in order to run the cmake tests successfully it is required that also
  9. # @bindir@/. and @bindir@/../lib are in DLL_PATH
  10. set(CMAKE_DL_LIBS "dl")
  11. set(CMAKE_C_COMPILE_OPTIONS_PIC "-fPIC")
  12. set(CMAKE_C_COMPILE_OPTIONS_PIE "-fPIE")
  13. set(CMAKE_SHARED_LIBRARY_C_FLAGS "-fPIC") # -pic
  14. set(CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS "-shared") # -shared
  15. set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") # +s, flag for exe link to use shared lib
  16. set(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,")
  17. #set(CMAKE_EXE_EXPORTS_C_FLAG "-Wl,--export-dynamic")
  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()
  26. include(Platform/UnixPaths)
  27. # these are Syllable specific:
  28. list(APPEND CMAKE_SYSTEM_PREFIX_PATH /usr/indexes)