CMakeLists.txt 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. SET(SOURCE_GROUP ${SOURCE_GROUP}\\posix)
  2. ua_add_architecture("posix")
  3. list (FIND UA_AMALGAMATION_ARCHITECUTRES "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. else()
  14. ua_architecture_append_to_library(m)
  15. if(UA_ENABLE_MULTITHREADING OR UA_BUILD_UNIT_TESTS)
  16. ua_architecture_append_to_library(pthread)
  17. endif()
  18. if(NOT APPLE AND (NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD"))
  19. ua_architecture_append_to_library(rt)
  20. endif()
  21. endif()
  22. ua_include_directories(${CMAKE_CURRENT_SOURCE_DIR})
  23. endif()
  24. endif()