diff options
author | Kevron Rees <kevron_m_rees@linux.intel.com> | 2013-03-07 13:18:46 -0800 |
---|---|---|
committer | Kevron Rees <kevron_m_rees@linux.intel.com> | 2013-03-07 13:19:31 -0800 |
commit | 148280e2928c75273b554cec7d4fe620d5029008 (patch) | |
tree | efa8026ac37503b504e983bc2eb1d312b5548268 | |
parent | fdbaa9a5e0f2716835dc7e45b192fea4f2c24da3 (diff) | |
download | automotive-message-broker-148280e2928c75273b554cec7d4fe620d5029008.tar.gz |
use pkgconfig for libwebsockets
-rw-r--r-- | plugins/websocketsink/CMakeLists.txt | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/plugins/websocketsink/CMakeLists.txt b/plugins/websocketsink/CMakeLists.txt index 5fc4eb86..c2e26a0b 100644 --- a/plugins/websocketsink/CMakeLists.txt +++ b/plugins/websocketsink/CMakeLists.txt @@ -1,18 +1,12 @@ include(CheckIncludeFiles) include_directories(${CMAKE_SOURCE_DIR}/lib ${include_dirs}) -find_library(websockets_LIBRARY websockets DOC "libwebsockets") - -if(websockets_LIBRARY) - message(STATUS "libwebsockets found") -else(websockets_LIBRARY) - message(FATAL_ERROR "libwebsockets not found. please install libwebsockets") -endif(websockets_LIBRARY) +pkg_check_modules(websockets REQUIRED libwebsockets) set(websocketsinkplugin_headers websocketsink.h websocketmanager.h) set(websocketsinkplugin_sources websocketsinkmanager.cpp websocketsink.cpp) add_library(websocketsinkplugin MODULE ${websocketsinkplugin_sources}) set_target_properties(websocketsinkplugin PROPERTIES PREFIX "") -target_link_libraries(websocketsinkplugin amb ${websockets_LIBRARY} -L${CMAKE_CURRENT_BINARY_DIR}/lib ${link_libraries}) +target_link_libraries(websocketsinkplugin amb ${websockets_LIBRARIES} -L${CMAKE_CURRENT_BINARY_DIR}/lib ${link_libraries}) install(TARGETS websocketsinkplugin LIBRARY DESTINATION lib/automotive-message-broker) |