Add CMake depends to check OpenAMP dependencies
[processor-sdk/open-amp.git] / lib / CMakeLists.txt
2 set_property (GLOBAL PROPERTY "PROJECT_LIB_EXTRA_CFLAGS")
4 collector_create (PROJECT_LIB_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}")
5 collect (PROJECT_LIB_DIRS "${CMAKE_CURRENT_BINARY_DIR}")
6 collect (PROJECT_INC_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/include")
7 collect (PROJECT_INC_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/include/openamp/machine/${PROJECT_MACHINE}")
8 collect (PROJECT_INC_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/include/openamp/system/${PROJECT_SYSTEM}/machine/${PROJECT_MACHINE}")
10 add_subdirectory (common)
11 add_subdirectory (virtio)
12 add_subdirectory (rpmsg)
13 add_subdirectory (remoteproc)
15 if (WITH_PROXY)
16   add_subdirectory (proxy)
17 endif (WITH_PROXY)
18 add_subdirectory (system)
20 set (OPENAMP_LIB open_amp)
22 collector_list (_list PROJECT_INC_DIRS)
23 include_directories (${_list})
25 get_property (_ecflags GLOBAL PROPERTY "PROJECT_LIB_EXTRA_CFLAGS")
27 collector_list (_list PROJECT_LIB_SOURCES)
28 set_property (SOURCE ${_list}
29   APPEND_STRING PROPERTY COMPILE_FLAGS " ${_ecflags}")
30 add_library (${OPENAMP_LIB} STATIC ${_list})
32 install (TARGETS ${OPENAMP_LIB} ARCHIVE DESTINATION lib)
33 install (DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/openamp" DESTINATION include)
35 # vim: expandtab:ts=2:sw=2:smartindent