github.com/orofarne/hammy@v0.0.0-20130409105742-374fadfd6ecb/worker/cmake/FindMsgPack.cmake (about) 1 # - Find msgpack 2 # Find the native Message Pack headers and libraries. 3 # 4 # MsgPack_INCLUDE_DIRS - where to find msgpack.hpp, etc. 5 # MsgPack_LIBRARIES - List of libraries when using MsgPack. 6 # MsgPack_FOUND - True if MsgPack found. 7 8 # Look for the header file. 9 FIND_PATH(MsgPack_INCLUDE_DIR NAMES msgpack.hpp) 10 11 # Look for the library. 12 FIND_LIBRARY(MsgPack_LIBRARY NAMES msgpack libmsgpack) 13 14 # handle the QUIETLY and REQUIRED arguments and set MsgPack_FOUND to TRUE if 15 # all listed variables are TRUE 16 INCLUDE(FindPackageHandleStandardArgs) 17 FIND_PACKAGE_HANDLE_STANDARD_ARGS(MsgPack DEFAULT_MSG MsgPack_LIBRARY MsgPack_INCLUDE_DIR) 18 19 # Copy the results to the output variables. 20 IF(MSGPACK_FOUND) 21 MESSAGE(STATUS "MsgPack found") 22 SET(MsgPack_LIBRARIES ${MsgPack_LIBRARY}) 23 SET(MsgPack_INCLUDE_DIRS ${MsgPack_INCLUDE_DIR}) 24 ELSE(MSGPACK_FOUND) 25 SET(MsgPack_LIBRARIES) 26 SET(MsgPack_INCLUDE_DIRS) 27 ENDIF(MSGPACK_FOUND) 28 29 MARK_AS_ADVANCED(MsgPack_INCLUDE_DIR MsgPack_LIBRARY)