zynq_remoteproc: solve the atomic warning
[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}")
11 add_subdirectory (common)
12 add_subdirectory (virtio)
13 add_subdirectory (rpmsg)
14 add_subdirectory (remoteproc)
16 if (WITH_PROXY)
17   add_subdirectory (proxy)
18 endif (WITH_PROXY)
19 add_subdirectory (system)
21 set (OPENAMP_LIB open_amp)
23 collector_list (_include PROJECT_INC_DIRS)
24 include_directories (${_include})
26 collector_list (_deps PROJECT_LIB_DEPS)
28 get_property (_ecflags GLOBAL PROPERTY "PROJECT_LIB_EXTRA_CFLAGS")
30 collector_list (_sources PROJECT_LIB_SOURCES)
31 set_property (SOURCE ${_sources}
32   APPEND_STRING PROPERTY COMPILE_FLAGS " ${_ecflags}")
34 # Build a shared library if so configured.
35 if (WITH_SHARED_LIB)
36   set (_lib ${OPENAMP_LIB}-shared)
37   add_library (${_lib} SHARED ${_sources})
38   target_link_libraries (${_lib} ${_deps})
39   install (TARGETS ${_lib} LIBRARY DESTINATION lib)
40   set_target_properties (${_lib} PROPERTIES
41     OUTPUT_NAME       "${OPENAMP_LIB}"
42     VERSION           "${PROJECT_VER}"
43     SOVERSION         "${PROJECT_VER_MAJOR}"
44   )
45 endif (WITH_SHARED_LIB)
47 if (WITH_STATIC_LIB)
48   set (_lib ${OPENAMP_LIB}-static)
49   add_library (${_lib} STATIC ${_sources})
50   install (TARGETS ${_lib} ARCHIVE DESTINATION lib)
51   set_target_properties (${_lib} PROPERTIES
52     OUTPUT_NAME       "${OPENAMP_LIB}"
53   )
54 endif (WITH_STATIC_LIB)
56 install (DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/openamp" DESTINATION include)
58 # vim: expandtab:ts=2:sw=2:smartindent