Add sound manager initial source code
[staging/soundmanager.git] / CMakeLists.txt
1 #
2 # Copyright (c) 2017 TOYOTA MOTOR CORPORATION
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #      http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 #
16
17 project(SoundManager C CXX)
18
19 cmake_minimum_required(VERSION 3.0)
20
21 set(PROJECT_NAME "Sound Manager binding and client library")
22 set(PROJECT_VERSION "1.0")
23 set(PROJECT_PRETTY_NAME "SM")
24 set(PROJECT_DESCRIPTION " Sound Manager binding and client library\
25   Binder communicates with Audio Manager and client library to hide IPC for Application")
26 set(PROJECT_URL "")
27 set(PROJECT_INCLUDEDIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR})
28 set(PROJECT_LIBDIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
29 set(SOUNDMANAGER_INCLUDEDIR ${PROJECT_INCLUDEDIR}/libsoundmanager)
30 set(binding_install_dir ${PREFIX}/lib/soundmanager)
31 set(PROJECT_BINDINGDIR ${binding_install_dir})
32 set(LIBSM_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/include)
33
34 # get pkgconfig
35 INCLUDE(FindPkgConfig)
36 link_libraries(-Wl,--as-needed -Wl,--gc-sections -Wl,--no-undefined)
37
38 set(CMAKE_BUILD_TYPE Debug)
39 set(DEBUGMODE "1")
40 add_definitions(-DDEBUGMODE)
41
42 add_subdirectory(soundmanager_binging)
43 add_subdirectory(libsoundmanager)
44 add_subdirectory(include)
45
46 #generate configure file
47 configure_file(soundmanager.pc.in soundmanager.pc @ONLY)
48 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/soundmanager.pc
49   DESTINATION
50   ${CMAKE_INSTALL_LIBDIR}/pkgconfig)