aboutsummaryrefslogtreecommitdiffstats
path: root/HAL-afb/HAL-plugin/CMakeLists.txt
diff options
context:
space:
mode:
authorfulup <fulup.arfoll@iot.bzh>2017-07-05 22:31:54 +0200
committerfulup <fulup.arfoll@iot.bzh>2017-07-05 22:31:54 +0200
commit3d5816a07c22dd6c655a60000fb0f175d613e484 (patch)
treee96ebc4d7fc38c79d2aae61fde0f5789f4219c9c /HAL-afb/HAL-plugin/CMakeLists.txt
parent85a4c0a1e0f666505cf2a2922c12e78b3c83c062 (diff)
Added a POC for ALSA/HAL plugin
Diffstat (limited to 'HAL-afb/HAL-plugin/CMakeLists.txt')
-rw-r--r--HAL-afb/HAL-plugin/CMakeLists.txt30
1 files changed, 22 insertions, 8 deletions
diff --git a/HAL-afb/HAL-plugin/CMakeLists.txt b/HAL-afb/HAL-plugin/CMakeLists.txt
index 73390b8..5923935 100644
--- a/HAL-afb/HAL-plugin/CMakeLists.txt
+++ b/HAL-afb/HAL-plugin/CMakeLists.txt
@@ -16,26 +16,40 @@
# limitations under the License.
###########################################################################
+# Needed to remove undefined snd_dlsym_start in plugin share object
+add_compile_options(-DPIC)
# Add target to project dependency list
-PROJECT_TARGET_ADD(hal-ctl-plugin)
+PROJECT_TARGET_ADD(ctl_afbhal)
# Define targets
- ADD_LIBRARY(hal-ctl-plugin MODULE HalPlugCtl.c)
+ ADD_LIBRARY(${TARGET_NAME} MODULE HalPlugCtl.c)
# Alsa Plugin properties
- SET_TARGET_PROPERTIES(hal-ctl-plugin PROPERTIES
- PREFIX "alsa-"
+ SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
+ PREFIX "libasound_module_"
OUTPUT_NAME ${TARGET_NAME}
)
-PROJECT_TARGET_ADD(hal-pcm-plugin)
+ # Library dependencies (include updates automatically)
+ TARGET_LINK_LIBRARIES(${TARGET_NAME}
+ ${link_libraries}
+ )
+ install(TARGETS ${TARGET_NAME} LIBRARY DESTINATION lib/alsa-lib)
+
+PROJECT_TARGET_ADD(cb_sample)
# Define targets
- ADD_LIBRARY(hal-pcm-plugin MODULE HalPlugPcm.c)
+ ADD_LIBRARY(${TARGET_NAME} MODULE HalPlugCb.c)
# Alsa Plugin properties
- SET_TARGET_PROPERTIES(hal-pcm-plugin PROPERTIES
- PREFIX "alsa-"
+ SET_TARGET_PROPERTIES(${TARGET_NAME} PROPERTIES
+ PREFIX "afbhal_"
OUTPUT_NAME ${TARGET_NAME}
)
+
+ # Library dependencies (include updates automatically)
+ TARGET_LINK_LIBRARIES(${TARGET_NAME}
+ ${link_libraries}
+ )
+ install(TARGETS ${TARGET_NAME} LIBRARY DESTINATION lib)