CMake: Zynq: generic: update to use xil,metal lib
[processor-sdk/open-amp.git] / cmake / depends.cmake
index aee3db7159b509303ddf947858446d8f477fca4e..477d90340bf52e1f8c524215c6b9d042cb081048 100644 (file)
@@ -1,5 +1,15 @@
 find_package (Libmetal REQUIRED)
 collect (PROJECT_INC_DIRS "${LIBMETAL_INCLUDE_DIR}")
 collect (PROJECT_LIB_DIRS "${LIBMETAL_LIB_DIR}")
+collect (PROJECT_LIB_DEPS "${LIBMETAL_LIB}")
 
+if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
+  check_include_files (stdatomic.h HAVE_STDATOMIC_H)
+
+else ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
+  set (_saved_cmake_required_flags ${CMAKE_REQUIRED_FLAGS})
+  set (CMAKE_REQUIRED_FLAGS "-c")
+  check_include_files (stdatomic.h HAVE_STDATOMIC_H)
+  set (CMAKE_REQUIRED_FLAGS ${_saved_cmake_required_flags})
+endif ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
 # vim: expandtab:ts=2:sw=2:smartindent