cb1e21f9b18053523a73846b7df151a8be0e1621
[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
8 SET(CMAKE_INSTALL_RPATH
9         ${CMAKE_INSTALL_RPATH}
10         ${CMAKE_INSTALL_PREFIX}/${DESTINATION_LIB_PREFIX}/${DESTINATION_NAME}
11 )
12
13 SET(SRCS_IMPL
14     JSBluetoothManager.cpp
15     JSBluetoothAdapter.cpp
16     JSBluetoothDevice.cpp
17     JSBluetoothSocket.cpp
18     JSBluetoothClass.cpp
19     JSBluetoothClassDeviceMajor.cpp
20     JSBluetoothClassDeviceMinor.cpp
21     JSBluetoothClassDeviceService.cpp
22     JSBluetoothServiceHandler.cpp
23     JSBluetoothHealthApplication.cpp
24     JSBluetoothHealthChannel.cpp
25     JSBluetoothProfileHandler.cpp
26     JSBluetoothHealthProfileHandler.cpp
27     BluetoothAdapter.cpp
28     BluetoothDevice.cpp
29     BluetoothSocket.cpp
30     BluetoothClass.cpp
31     BluetoothClassDeviceMajor.cpp
32     BluetoothClassDeviceMinor.cpp
33     BluetoothClassDeviceService.cpp
34     BluetoothServiceHandler.cpp
35     BluetoothCallbackUtil.cpp
36     BluetoothCallback.cpp
37     BluetoothHealthApplication.cpp
38     BluetoothHealthChannel.cpp
39     BluetoothHealthProfileHandlerCallback.cpp
40     BluetoothHealthProfileHandler.cpp
41 )
42
43 INCLUDE_DIRECTORIES(
44         ${INCLUDE_COMMON}
45         ${bluetooth_INCLUDE_DIRS}
46         ${system-info_INCLUDE_DIRS}
47 )
48
49 ADD_LIBRARY(${TARGET_IMPL_NAME} SHARED ${SRCS_IMPL})
50
51 TARGET_LINK_LIBRARIES(${TARGET_IMPL_NAME}
52         ${LIBS_COMMON}
53         ${bluetooth_LIBRARIES}
54         ${system-info_LIBRARIES}
55 )
56
57 SET(SRCS
58         plugin_config.cpp
59         plugin_initializer.cpp
60 )
61
62 ADD_LIBRARY(${TARGET_NAME} SHARED ${SRCS})
63
64 TARGET_LINK_LIBRARIES(${TARGET_NAME}
65         ${TARGET_IMPL_NAME}
66 )
67
68 INSTALL(TARGETS ${TARGET_NAME} ${TARGET_IMPL_NAME} LIBRARY DESTINATION ${DESTINATION_LIB_PREFIX}/${DESTINATION_NAME})
69 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/config.xml DESTINATION ${DESTINATION_LIB_PREFIX}/${DESTINATION_NAME})
70 ENDIF(ENABLE_OPTIONAL_BT)
71 INSTALL(
72         DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DESTINATION ${DESTINATION_HEADER_PREFIX}/bluetooth
73         FILES_MATCHING PATTERN "*.h" PATTERN "CMakeFiles" EXCLUDE
74 )