Skip to content
This repository was archived by the owner on Aug 5, 2022. It is now read-only.

Commit cb3a6b2

Browse files
committed
CMake: use the package config file provided by the core
It defines a ParameterFramework::plugin imported library. Signed-off-by: David Wagner <[email protected]>
1 parent 4afde77 commit cb3a6b2

File tree

3 files changed

+7
-16
lines changed

3 files changed

+7
-16
lines changed

CMakeLists.txt

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2011-2015, Intel Corporation
1+
# Copyright (c) 2011-2016, Intel Corporation
22
# All rights reserved.
33
#
44
# Redistribution and use in source and binary forms, with or without modification,
@@ -34,16 +34,9 @@ project(parameter-framework-plugins-alsa)
3434
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Werror -Wall -Wextra")
3535

3636
#
37-
# Find PFW libraries and include directories
37+
# Find the Parameter Framework core
3838
#
39-
find_path(PFW_INCLUDE_ROOT NAMES parameter/plugin/Plugin.h)
40-
41-
find_library(PFW_CORE_LIBRARY NAMES parameter)
42-
43-
set(PFW_INCLUDE_DIRS
44-
${PFW_INCLUDE_ROOT}/parameter/plugin
45-
${PFW_INCLUDE_ROOT}/xmlserializer
46-
${PFW_INCLUDE_ROOT}/utility)
39+
find_package(ParameterFramework 3 REQUIRED)
4740

4841
#
4942
# Find (regular) alsa-lib

base/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2011-2014, Intel Corporation
1+
# Copyright (c) 2011-2016, Intel Corporation
22
# All rights reserved.
33
#
44
# Redistribution and use in source and binary forms, with or without modification,
@@ -31,7 +31,7 @@ add_library(alsabase-subsystem STATIC
3131
AlsaCtlPortConfig.cpp
3232
AmixerControl.cpp)
3333

34-
include_directories(${PFW_INCLUDE_DIRS})
34+
target_link_libraries(alsabase-subsystem ParameterFramework::plugin)
3535

3636
# FIXME: suppress the need for -Wno-unused-parameter
3737
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-parameter -fPIC")

legacy/CMakeLists.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2011-2015, Intel Corporation
1+
# Copyright (c) 2011-2016, Intel Corporation
22
# All rights reserved.
33
#
44
# Redistribution and use in source and binary forms, with or without modification,
@@ -33,13 +33,11 @@ add_library(alsa-subsystem SHARED
3333
LegacyAlsaCtlPortConfig.cpp)
3434

3535
include_directories(
36-
${PFW_INCLUDE_DIRS}
3736
${PROJECT_SOURCE_DIR}/base
3837
${PROJECT_SOURCE_DIR}/legacy)
3938

4039
target_link_libraries(alsa-subsystem
4140
alsabase-subsystem
42-
${ALSA_LIBRARIES}
43-
${PFW_CORE_LIBRARY})
41+
${ALSA_LIBRARIES})
4442

4543
install(TARGETS alsa-subsystem LIBRARY DESTINATION lib)

0 commit comments

Comments
 (0)