Permalink
Browse files

Add OpenSSL/Websocketpp dependencies to CMake build

  • Loading branch information...
1 parent b45033d commit 650acaf49ddffd089aa4e9a15e45028d0372f0f9 @jrogers jrogers committed Apr 6, 2016
View
@@ -29,8 +29,10 @@ set(CMAKE_MODULE_PATH
"${CMAKE_SOURCE_DIR}/cmake/Modules/")
find_package(Boost REQUIRED COMPONENTS program_options system thread)
-find_package(Libmsgpack REQUIRED)
+find_package(Websocketpp REQUIRED)
+find_package(Msgpack REQUIRED)
find_package(Threads REQUIRED)
+find_package(OpenSSL REQUIRED)
set(PUBLIC_HEADERS
${CMAKE_CURRENT_SOURCE_DIR}/autobahn/autobahn.hpp
@@ -1,41 +0,0 @@
-# - Try to find libmsgpack
-# Once done this will define
-# Libmsgpack_FOUND - System has libmsgpack
-# Libmsgpack_INCLUDE_DIRS - The libmsgpack include directories
-# Libmsgpack_DEFINITIONS - Compiler switches (including include directories) needed for using libmsgpack
-# Libmsgpack_LIBRARIES - The libraries needed to use libmsgpack
-
-find_package(PkgConfig QUIET)
-
-if(Libmsgpack_USE_STATIC_LIBS)
- set( _libmsgpack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
- set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
-endif()
-
-if (PKG_CONFIG_FOUND)
- pkg_check_modules(PC_MSGPACK QUIET libmsgpack)
-endif (PKG_CONFIG_FOUND)
-
-find_path(Libmsgpack_INCLUDE_DIR msgpack.hpp
- HINTS ${PC_LIBMSGPACK_INCLUDEDIR} ${PC_LIBMSGPACK_INCLUDE_DIRS})
-
-find_library(Libmsgpack_LIBRARY NAMES msgpack
- HINTS ${PC_MSGPACK_LIBDIR} ${PC_LIBMSGPACK_LIBRARY_DIRS})
-
-if(Libmsgpack_USE_STATIC_LIBS)
- set(CMAKE_FIND_LIBRARY_SUFFIXES ${_libmsgpack_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES})
-endif()
-
-set(Libmsgpack_LIBRARIES ${Libmsgpack_LIBRARY})
-set(Libmsgpack_INCLUDE_DIRS ${Libmsgpack_INCLUDE_DIR})
-
-include(FindPackageHandleStandardArgs)
-# handle the QUIETLY and REQUIRED arguments and set Libmsgpack_FOUND to TRUE
-# if all listed variables are TRUE
-find_package_handle_standard_args(Libmsgpack DEFAULT_MSG
- Libmsgpack_LIBRARY
- Libmsgpack_LIBRARIES
- Libmsgpack_INCLUDE_DIR
- Libmsgpack_INCLUDE_DIRS)
-
-mark_as_advanced(Libmsgpack_INCLUDE_DIR Libmsgpack_LIBRARY)
@@ -0,0 +1,24 @@
+# - Try to find msgpack
+# Once done this will define
+# Msgpack_FOUND - System has msgpack
+# Msgpack_INCLUDE_DIRS - The msgpack include directories
+
+find_package(PkgConfig QUIET)
+
+if (PKG_CONFIG_FOUND)
+ pkg_check_modules(PC_MSGPACK QUIET msgpack)
+endif (PKG_CONFIG_FOUND)
+
+find_path(Msgpack_INCLUDE_DIR msgpack.hpp
+ HINTS ${PC_MSGPACK_INCLUDEDIR} ${PC_MSGPACK_INCLUDE_DIRS})
+
+set(Msgpack_INCLUDE_DIRS ${Msgpack_INCLUDE_DIR})
+
+include(FindPackageHandleStandardArgs)
+# handle the QUIETLY and REQUIRED arguments and set Msgpack_FOUND to TRUE
+# if all listed variables are TRUE
+find_package_handle_standard_args(Msgpack DEFAULT_MSG
+ Msgpack_INCLUDE_DIR
+ Msgpack_INCLUDE_DIRS)
+
+mark_as_advanced(Msgpack_INCLUDE_DIR)
@@ -0,0 +1,24 @@
+# - Try to find websocketpp
+# Once done this will define
+# Websocketpp_FOUND - System has websocketpp
+# Websocketpp_INCLUDE_DIRS - The websocketpp include directories
+
+find_package(PkgConfig QUIET)
+
+if (PKG_CONFIG_FOUND)
+ pkg_check_modules(PC_WEBSOCKETPP QUIET websocketpp)
+endif (PKG_CONFIG_FOUND)
+
+find_path(Websocketpp_INCLUDE_DIR websocketpp
+ HINTS ${PC_WEBSOCKETPP_INCLUDEDIR} ${PC_WEBSOCKETPP_INCLUDE_DIRS})
+
+set(Websocketpp_INCLUDE_DIRS ${Websocketpp_INCLUDE_DIR})
+
+include(FindPackageHandleStandardArgs)
+# handle the QUIETLY and REQUIRED arguments and set Websocketpp_FOUND to TRUE
+# if all listed variables are TRUE
+find_package_handle_standard_args(Websocketpp DEFAULT_MSG
+ Websocketpp_INCLUDE_DIR
+ Websocketpp_INCLUDE_DIRS)
+
+mark_as_advanced(Websocketpp_INCLUDE_DIR)
@@ -1,5 +1,5 @@
-include_directories(${CMAKE_SOURCE_DIR} ${Boost_INCLUDE_DIRS} ${Libmsgpack_INCLUDE_DIRS})
-link_libraries(${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
+include_directories(${CMAKE_SOURCE_DIR} ${Boost_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR} ${Websocketpp_INCLUDE_DIRS} ${Msgpack_INCLUDE_DIRS})
+link_libraries(${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
set(PARAMETERS_SOURCES parameters.cpp)
set(PARAMETERS_HEADERS parameters.hpp)

0 comments on commit 650acaf

Please sign in to comment.