2 # Copyright (c) 2017 TOYOTA MOTOR CORPORATION
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
8 # http://www.apache.org/licenses/LICENSE-2.0
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.
17 project(HomeScreenService C CXX)
19 cmake_minimum_required(VERSION 3.0)
21 set(PROJECT_NAME "HomeScreen Service and client library")
22 set(PROJECT_VERSION "1.0")
23 set(PROJECT_PRETTY_NAME "HM")
24 set(PROJECT_DESCRIPTION "HomeScreen Service and client library")
25 set(PROJECT_INCLUDEDIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR})
26 set(PROJECT_LIBDIR ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
27 set(binding_install_dir ${PREFIX}/lib/homescreen)
28 set(PROJECT_BINDINGDIR ${binding_install_dir})
29 set(LIBSM_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/include)
32 INCLUDE(FindPkgConfig)
33 link_libraries(-Wl,--as-needed -Wl,--gc-sections -Wl,--no-undefined)
35 set(CMAKE_BUILD_TYPE Debug)
37 add_definitions(-DDEBUGMODE)
40 add_subdirectory(libhomescreen)
41 add_subdirectory(include)
43 #generate configure file
44 configure_file(homescreen.pc.in homescreen.pc @ONLY)
45 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/homescreen.pc
47 ${CMAKE_INSTALL_LIBDIR}/pkgconfig)