apps: machine: zynqmp_r5: correct IPI setting.
[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")
9 add_subdirectory (common)
10 add_subdirectory (virtio)
11 add_subdirectory (rpmsg)
12 add_subdirectory (remoteproc)
14 if (WITH_PROXY)
15   add_subdirectory (proxy)
16 endif (WITH_PROXY)
18 set (OPENAMP_LIB open_amp)
20 if (NOT CMAKE_INSTALL_LIBDIR)
21         set (CMAKE_INSTALL_LIBDIR "lib")
22 endif (NOT CMAKE_INSTALL_LIBDIR)
24 collector_list (_include PROJECT_INC_DIRS)
25 include_directories (${_include})
27 collector_list (_deps PROJECT_LIB_DEPS)
29 get_property (_ecflags GLOBAL PROPERTY "PROJECT_LIB_EXTRA_CFLAGS")
31 collector_list (_sources PROJECT_LIB_SOURCES)
32 set_property (SOURCE ${_sources}
33   APPEND_STRING PROPERTY COMPILE_FLAGS " ${_ecflags}")
35 # Build a shared library if so configured.
36 if (WITH_SHARED_LIB)
37   set (_lib ${OPENAMP_LIB}-shared)
38   add_library (${_lib} SHARED ${_sources})
39   target_link_libraries (${_lib} ${_deps})
40   install (TARGETS ${_lib} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
41   set_target_properties (${_lib} PROPERTIES
42     OUTPUT_NAME       "${OPENAMP_LIB}"
43     VERSION           "${PROJECT_VER}"
44     SOVERSION         "${PROJECT_VER_MAJOR}"
45   )
46 endif (WITH_SHARED_LIB)
48 if (WITH_STATIC_LIB)
49   set (_lib ${OPENAMP_LIB}-static)
50   add_library (${_lib} STATIC ${_sources})
51   install (TARGETS ${_lib} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
52   set_target_properties (${_lib} PROPERTIES
53     OUTPUT_NAME       "${OPENAMP_LIB}"
54   )
55 endif (WITH_STATIC_LIB)
57 install (DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/openamp" DESTINATION include)
59 # vim: expandtab:ts=2:sw=2:smartindent