diff options
author | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2018-07-05 13:19:09 +0300 |
---|---|---|
committer | George Kiagiadakis <george.kiagiadakis@collabora.com> | 2018-08-28 12:14:05 +0300 |
commit | 699e0ab7dd2ff86192e92d038ca0d008ec0bfb34 (patch) | |
tree | 50286b2a4ef25ef958a131c7a2f08a767159c020 /CMakeLists.txt | |
parent | 4308a87133311d3bc63a0f4c21711c3c8462649a (diff) |
Initial version
Change-Id: Iea9164fcf116ffb0683996830d371ca418694e6c
Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..22584b1 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,41 @@ +project(pulseaudio-module-4a C) + +cmake_minimum_required(VERSION 2.8.8) +set(CMAKE_BUILD_TYPE Debug) +set(CMAKE_POSITION_INDEPENDENT_CODE ON) + +set(PROJECT_NAME "Pulseaudio Module 4A") +set(PROJECT_VERSION "0.1") + +find_package(PkgConfig) +include(GNUInstallDirs) + +########################################################################### + +add_compile_options(-Wall -Wextra -Wconversion) +add_compile_options(-Wno-unused-parameter -Wno-unused-variable -Wno-unused-but-set-variable) +add_compile_options(-Wno-parentheses) +add_compile_options(-Wno-sign-compare -Wno-sign-conversion) +add_compile_options(-Werror=maybe-uninitialized) +add_compile_options(-Werror=implicit-function-declaration) +add_compile_options(-ffunction-sections -fdata-sections) + +########################################################################### + +pkg_check_modules(dependencies REQUIRED libafbwsc libsystemd pulseaudio-module-devel) +pkg_get_variable(plugin_install_dir pulseaudio-module-devel modlibexecdir) + +add_definitions(${dependencies_CFLAGS}) +include_directories(${dependencies_INCLUDE_DIRS}) +string(REGEX REPLACE ";" " " dep_link_flags "${dependencies_LDFLAGS}" "") +set(link_flags "${dep_link_flags} -Wl,-rpath=${plugin_install_dir} -Wl,--as-needed -Wl,--gc-sections") + +############################################################ + +add_library(module-4a-client MODULE module-4a-client.c m4a_afb_comm.c) +target_link_libraries(module-4a-client ${dependencies_LIBRARIES}) +set_target_properties(module-4a-client PROPERTIES PREFIX "" + LINK_FLAGS "${link_flags}") + +install(TARGETS module-4a-client + DESTINATION ${plugin_install_dir}) |