Update change log and spec for wrt-plugins-tizen_0.4.49
[framework/web/wrt-plugins-tizen.git] / src / Bluetooth / CMakeLists.txt
1 SET(TARGET_NAME ${bluetooth_target})
2 SET(DESTINATION_NAME ${bluetooth_dest})
3 SET(TARGET_IMPL_NAME ${bluetooth_impl})
4
5 IF(ENABLE_OPTIONAL_BT)
6 PKG_SEARCH_MODULE(bluetooth REQUIRED capi-network-bluetooth)
7 PKG_SEARCH_MODULE(system-info REQUIRED capi-system-info)
8
9 SET(CMAKE_INSTALL_RPATH
10         ${CMAKE_INSTALL_RPATH}
11         ${CMAKE_INSTALL_PREFIX}/${DESTINATION_LIB_PREFIX}/${DESTINATION_NAME}
12 )
13
14 SET(SRCS_IMPL
15     JSBluetoothManager.cpp
16     JSBluetoothAdapter.cpp
17     JSBluetoothDevice.cpp
18     JSBluetoothSocket.cpp
19     JSBluetoothClass.cpp
20     JSBluetoothClassDeviceMajor.cpp
21     JSBluetoothClassDeviceMinor.cpp
22     JSBluetoothClassDeviceService.cpp
23     JSBluetoothServiceHandler.cpp
24     JSBluetoothHealthApplication.cpp
25     JSBluetoothHealthChannel.cpp
26     JSBluetoothProfileHandler.cpp
27     JSBluetoothHealthProfileHandler.cpp
28     BluetoothAdapter.cpp
29     BluetoothDevice.cpp
30     BluetoothSocket.cpp
31     BluetoothClass.cpp
32     BluetoothClassDeviceMajor.cpp
33     BluetoothClassDeviceMinor.cpp
34     BluetoothClassDeviceService.cpp
35     BluetoothServiceHandler.cpp
36     BluetoothCallbackUtil.cpp
37     BluetoothCallback.cpp
38     BluetoothHealthApplication.cpp
39     BluetoothHealthChannel.cpp
40     BluetoothHealthProfileHandlerCallback.cpp
41     BluetoothHealthProfileHandler.cpp
42 )
43
44 INCLUDE_DIRECTORIES(
45         ${INCLUDE_COMMON}
46         ${bluetooth_INCLUDE_DIRS}
47         ${system-info_INCLUDE_DIRS}
48 )
49
50 ADD_LIBRARY(${TARGET_IMPL_NAME} SHARED ${SRCS_IMPL})
51
52 TARGET_LINK_LIBRARIES(${TARGET_IMPL_NAME}
53         ${LIBS_COMMON}
54         ${bluetooth_LIBRARIES}
55         ${system-info_LIBRARIES}
56 )
57
58 SET(SRCS
59         plugin_config.cpp
60         plugin_initializer.cpp
61 )
62
63 ADD_LIBRARY(${TARGET_NAME} SHARED ${SRCS})
64
65 TARGET_LINK_LIBRARIES(${TARGET_NAME}
66         ${TARGET_IMPL_NAME}
67 )
68
69 INSTALL(TARGETS ${TARGET_NAME} ${TARGET_IMPL_NAME} LIBRARY DESTINATION ${DESTINATION_LIB_PREFIX}/${DESTINATION_NAME})
70 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/config.xml DESTINATION ${DESTINATION_LIB_PREFIX}/${DESTINATION_NAME})
71 ENDIF(ENABLE_OPTIONAL_BT)
72 INSTALL(
73         DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DESTINATION ${DESTINATION_HEADER_PREFIX}/bluetooth
74         FILES_MATCHING PATTERN "*.h" PATTERN "CMakeFiles" EXCLUDE
75 )