CMakeLists.txt 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. SET(SOURCE_GROUP ${SOURCE_GROUP}\\posix)
  2. ua_add_architecture("posix")
  3. list (FIND UA_AMALGAMATION_ARCHITECTURES "posix" _index)
  4. if (${_index} GREATER -1 OR "${UA_ARCHITECTURE}" STREQUAL "posix")
  5. ua_add_architecture_file(${CMAKE_CURRENT_SOURCE_DIR}/ua_clock.c)
  6. ua_add_architecture_file(${CMAKE_CURRENT_SOURCE_DIR}/ua_architecture_functions.c)
  7. if("${UA_ARCHITECTURE}" STREQUAL "posix")
  8. if(NOT CYGWIN AND NOT QNXNTO AND (NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD"))
  9. ua_architecture_add_definitions(-Wshadow -Wconversion -fvisibility=hidden -fPIC)
  10. endif()
  11. if(QNXNTO)
  12. ua_architecture_append_to_library(socket c stdc++)
  13. elseif(OS9)
  14. ua_architecture_append_to_library(netdb ndblib socket)
  15. else()
  16. ua_architecture_append_to_library(m)
  17. #TODO - Error on first make run if pthread is included conditional?
  18. ua_architecture_append_to_library(pthread)
  19. if(UA_ENABLE_MULTITHREADING OR UA_BUILD_UNIT_TESTS)
  20. ua_architecture_append_to_library(pthread)
  21. endif()
  22. if(NOT APPLE AND (NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD"))
  23. ua_architecture_append_to_library(rt)
  24. endif()
  25. endif()
  26. ua_include_directories(${CMAKE_CURRENT_SOURCE_DIR})
  27. endif()
  28. endif()