mirror of https://github.com/thesofproject/sof.git
tplg_parser: support building as static or shared library.
Allow the tplg_parser to built as either static or shared library. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This commit is contained in:
parent
d9f9340e1a
commit
67ae353bfb
|
@ -8,7 +8,13 @@ include(../../scripts/cmake/misc.cmake)
|
|||
|
||||
set(sof_source_directory "${PROJECT_SOURCE_DIR}/../..")
|
||||
|
||||
add_library(sof_tplg_parser SHARED
|
||||
if (CONFIG_LIBRARY_STATIC)
|
||||
add_library(sof_tplg_parser STATIC "")
|
||||
else()
|
||||
add_library(sof_tplg_parser SHARED "")
|
||||
endif()
|
||||
|
||||
target_sources(sof_tplg_parser PUBLIC
|
||||
tokens.c
|
||||
process.c
|
||||
control.c
|
||||
|
@ -32,7 +38,7 @@ target_include_directories(sof_tplg_parser PRIVATE ${sof_source_directory}/src/p
|
|||
|
||||
# TODO: add IPC4 option when it's ready.
|
||||
target_compile_options(sof_tplg_parser PRIVATE
|
||||
-g -O -Wall -Werror -Wl,-EL
|
||||
-g -O -Wall -Werror -Wl,-EL -fPIC -DPIC
|
||||
-Wmissing-prototypes -Wimplicit-fallthrough
|
||||
-DCONFIG_LIBRARY -DCONFIG_IPC_MAJOR_3)
|
||||
|
||||
|
|
Loading…
Reference in New Issue