* updated license headers
[profile/ivi/genivi/genivi-audio-manager.git] / PluginControlInterface / test / CMakeLists.txt
1 # Copyright (c) 2012 GENIVI Alliance
2 # Copyright (c) 2012 BMW
3 #
4 # author Christian Mueller, christian.ei.mueller@bmw.de BMW 2011,2012
5 #
6 # copyright
7 # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction,
8 # including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
9 # subject to the following conditions:
10 # The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
11 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
12 # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
13 # THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14 #
15 # For further information see http://www.genivi.org/.
16 #
17 cmake_minimum_required(VERSION 2.6)
18
19 PROJECT(AmControlReceiverShadowTest)
20
21 set(EXECUTABLE_OUTPUT_PATH ${TEST_EXECUTABLE_OUTPUT_PATH})
22 FIND_PACKAGE(GTest REQUIRED) 
23
24 find_package (Threads)
25 FIND_PACKAGE(PkgConfig)
26 pkg_check_modules(DLT REQUIRED automotive-dlt)
27
28 INCLUDE_DIRECTORIES(   
29     ${STD_INCLUDE_DIRS}
30     ${CMAKE_SOURCE_DIR} 
31     ${CMAKE_CURRENT_BINARY_DIR}
32     ${AUDIO_include_FOLDER}
33     ${CMAKE_SOURCE_DIR} 
34     ${DLT_INCLUDE_DIRS}
35     ${include_FOLDER}
36     ${GTEST_INCLUDE_DIR}
37     ${DBUS_INCLUDE_DIR}
38     ${DBUS_ARCH_INCLUDE_DIR}
39     "../../AudioManagerDaemon/include"
40     "../include"
41 )
42    
43 file(GLOB CONTROL_RECEIVER_PLUGIN_INTERFACE_SRCS_CXX 
44      "../../AudioManagerDaemon/src/CAmSocketHandler.cpp"
45      "../../AudioManagerDaemon/src/CAmDltWrapper.cpp"     
46      "../src/IAmControlReceiverShadow.cpp"  
47      "CAmControlReceiverShadowTest.cpp" 
48 )
49
50
51 ADD_EXECUTABLE(AmControlReceiverShadowTest ${CONTROL_RECEIVER_PLUGIN_INTERFACE_SRCS_CXX})
52
53
54 TARGET_LINK_LIBRARIES(AmControlReceiverShadowTest 
55     ${DLT_LIBRARIES}
56     ${CMAKE_DL_LIBS}
57     ${CMAKE_THREAD_LIBS_INIT}
58     ${GTEST_LIBRARIES}
59     ${DBUS_LIBRARY}
60     ${SQLITE_LIBRARIES}
61     gmock
62 )
63
64 INSTALL(TARGETS AmControlReceiverShadowTest 
65         DESTINATION "~/AudioManagerTest/"
66         PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ GROUP_EXECUTE GROUP_READ WORLD_EXECUTE WORLD_READ
67         COMPONENT tests
68 )
69
70 SET(ADD_DEPEND "audiomanager-bin" "dlt" "libdbus-1-3(>=1.2.16)" "libgtest-dev(>=1.6.0-1)" "google-mock" "libpthread-stubs0")
71 set_property(GLOBAL APPEND PROPERTY tests_prop "${ADD_DEPEND}")
72