Commit f2e7ca78 authored by Rodrigo Braga Pinheiro's avatar Rodrigo Braga Pinheiro
Browse files

Modificando o FindZeromq

Adicionando path de busca dentro do findprotobuf
No related merge requests found
Showing with 79 additions and 87 deletions
+79 -87
......@@ -29,9 +29,9 @@ if( WIN32 )
set( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/optional ${CMAKE_MODULE_PATH} )
endif()
find_package( Protobuf REQUIRED )
find_package( protobuf REQUIRED )
include_directories( ${CORAL_INCLUDE_DIRS} ${ZMQ_INCLUDE_DIRS} ${PROTOBUF_INCLUDE_DIRS} )
include_directories( ${CORAL_INCLUDE_DIRS} ${ZEROMQ_INCLUDE_DIRS} ${PROTOBUF_INCLUDE_DIRS} )
################################################################################
# Packaging
......
SET( LIBRARY_NAME ZEROMQ )
# --------------------------------------------------------------------
# Find the ZEROMQ library
# This module accepts the following environment variables:
# ZEROMQ_ROOT or ZEROMQ_DIR - Specify the location of ZEROMQ
#
# This module defines the following variables:
# ZEROMQ_INCLUDE_DIR - include directory for ZEROMQ
# ZEROMQ_LIBRARIES - libraries to link against ZEROMQ
# ZEROMQ_FOUND - true if ZEROMQ has been found and can be used
# --------------------------------------------------------------------
# Looking for the include files
FIND_PATH( ${LIBRARY_NAME}_INCLUDE_DIR
NAMES
zmq.h
HINTS
ENV ${LIBRARY_NAME}_ROOT
ENV ${LIBRARY_NAME}_DIR
PATH_SUFFIXES
include
)
# Looking for release library
# Also called ZEROMQ_LIBRARY_RELEASE
FIND_LIBRARY( ${LIBRARY_NAME}_LIBRARY
NAMES
libzmq
HINTS
ENV ${LIBRARY_NAME}_ROOT
ENV ${LIBRARY_NAME}_DIR
PATH_SUFFIXES
lib/release
lib
)
# Looking for debug library
FIND_LIBRARY( ${LIBRARY_NAME}_LIBRARY_DEBUG
NAMES
libzmqd
HINTS
ENV ${LIBRARY_NAME}_ROOT
ENV ${LIBRARY_NAME}_DIR
PATH_SUFFIXES
lib/debug
lib
)
# Handle the QUIETLY and REQUIRED arguments and set ZEROMQ_FOUND to TRUE if all listed variables are TRUE
FIND_PACKAGE( PackageHandleStandardArgs REQUIRED )
FIND_PACKAGE_HANDLE_STANDARD_ARGS( ${LIBRARY_NAME} REQUIRED_VARS ${LIBRARY_NAME}_INCLUDE_DIR ${LIBRARY_NAME}_LIBRARY )
IF( ${LIBRARY_NAME}_FOUND )
IF( ${LIBRARY_NAME}_LIBRARY_DEBUG )
# Merging release and debug libraries
# IMPORTANT: "debug" and "optimized" keywords must be lowercase
SET( ${LIBRARY_NAME}_LIBRARIES optimized ${${LIBRARY_NAME}_LIBRARY} debug ${${LIBRARY_NAME}_LIBRARY_DEBUG} )
ELSE()
SET( ${LIBRARY_NAME}_LIBRARIES ${${LIBRARY_NAME}_LIBRARY} )
ENDIF()
ENDIF()
MARK_AS_ADVANCED(
${LIBRARY_NAME}_INCLUDE_DIR
${LIBRARY_NAME}_LIBRARY
${LIBRARY_NAME}_LIBRARY_DEBUG
)
\ No newline at end of file
......@@ -197,6 +197,8 @@ FIND_PROGRAM( PROTOBUF_PROTOC_EXECUTABLE
${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/Release
${PROTOBUF_SRC_ROOT_FOLDER}/vsprojects/Debug
${PROTOBUF_SRC_ROOT_FOLDER}/bin
${PROTOBUF_SRC_ROOT_FOLDER}/bin/Release
${PROTOBUF_SRC_ROOT_FOLDER}/bin/Debug
)
MARK_AS_ADVANCED( PROTOBUF_PROTOC_EXECUTABLE )
......
# - Find the ZMQ
# This module accepts the following environment variables:
# ZMQ_ROOT or ZMQ_DIR or ZEROMQ_ROOT - Specify the location of ZMQ
#
# This module defines the following variables:
# ZMQ_INCLUDE_DIRS - include directories for ZMQ
# ZMQ_LIBRARIES - libraries to link against ZMQ
# ZMQ_FOUND - true if ZMQ has been found and can be used
#=============================================================================
# Copyright 2014 SiVIEP
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# Looking for the include files
FIND_PATH( ZMQ_INCLUDE_DIR
NAMES
zmq.h
HINTS
ENV ZMQ_ROOT
ENV ZMQ_DIR
ENV ZEROMQ_ROOT
PATH_SUFFIXES
include
)
# Looking for release library
# Also called XXX_LIBRARY_RELEASE
FIND_LIBRARY( ZMQ_LIBRARY
NAMES
zmq zmq_r zmq_release zdll libzmq-v120-mt-4_0_4 libzmq
HINTS
ENV ZMQ_ROOT
ENV ZMQ_DIR
ENV ZEROMQ_ROOT
PATH_SUFFIXES
lib/release
lib
)
# Looking for debug library
FIND_LIBRARY( ZMQ_LIBRARY_DEBUG
NAMES
zmqd zmq_d zmq_debug zdlld libzmq-v120-mt-gd-4_0_4 libzmq libzmqd
HINTS
ENV ZMQ_ROOT
ENV ZMQ_DIR
ENV ZEROMQ_ROOT
PATH_SUFFIXES
lib/debug
lib
)
# Handle the QUIETLY and REQUIRED arguments and set ZMQ_FOUND to TRUE if all listed variables are TRUE
FIND_PACKAGE( PackageHandleStandardArgs REQUIRED )
FIND_PACKAGE_HANDLE_STANDARD_ARGS( ZMQ REQUIRED_VARS ZMQ_INCLUDE_DIR ZMQ_LIBRARY )
if( ZMQ_FOUND )
SET( ZMQ_INCLUDE_DIRS ${ZMQ_INCLUDE_DIR} )
# Merging release and debug libraries
# IMPORTANT: "debug" and "optimized" keywords must be lowercase
SET( ZMQ_LIBRARIES
optimized ${ZMQ_LIBRARY}
debug ${ZMQ_LIBRARY_DEBUG}
)
endif()
MARK_AS_ADVANCED(
ZMQ_INCLUDE_DIR
ZMQ_LIBRARY
ZMQ_LIBRARY_DEBUG
)
......@@ -8,9 +8,9 @@ if( RPC_ONLY STREQUAL "OFF" )
add_subdirectory( flow )
endif()
find_package( zmq REQUIRED )
find_package( ZEROMQ REQUIRED )
if( ZMQ_FOUND )
if( ZEROMQ_FOUND )
set( BUILD_ZMQ "ON" CACHE BOOL "ZMQ transport layer" )
else()
set( BUILD_ZMQ "OFF" CACHE BOOL "ZMQ transport layer" )
......
......@@ -3,7 +3,10 @@
################################################################################
CORAL_GENERATE_MODULE( _GENERATED_FILES zmq )
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/generated ${ZMQ_INCLUDE_DIR} )
include_directories(
${CMAKE_CURRENT_BINARY_DIR}/generated
${ZEROMQ_INCLUDE_DIR}
)
file( GLOB _SOURCES *.cpp )
file( GLOB _HEADERS *.h )
......@@ -13,7 +16,7 @@ add_dependencies( zmq rpc )
CORAL_MODULE_TARGET( "zmq" zmq )
target_link_libraries( zmq ${CORAL_LIBRARIES} ${ZMQ_LIBRARIES} )
target_link_libraries( zmq ${CORAL_LIBRARIES} ${ZEROMQ_LIBRARIES} )
################################################################################
# Source Groups
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment