From: vsr Date: Thu, 21 Mar 2019 06:07:08 +0000 (+0300) Subject: Integration of [CEA 13233] support new xdr.h location X-Git-Tag: V9_3_0b2~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4814eabb5c060a2dfee60bb07133dffa9bc0689d;p=tools%2Fconfiguration.git Integration of [CEA 13233] support new xdr.h location - Attempt 3: there can be a separate xdr library on some platforms --- diff --git a/cmake/FindXDR.cmake b/cmake/FindXDR.cmake index d61ab2f..2a0ba1e 100644 --- a/cmake/FindXDR.cmake +++ b/cmake/FindXDR.cmake @@ -19,6 +19,8 @@ MESSAGE(STATUS "Check for XDR ...") +INCLUDE(FindPackageHandleStandardArgs) + FIND_PATH(XDR_INCLUDE_DIRS rpc/xdr.h PATH_SUFFIXES tirpc) IF(XDR_INCLUDE_DIRS) SET(XDR_DEFINITIONS "-DHAS_XDR") @@ -34,7 +36,15 @@ IF(WIN32) SET(XDR_INCLUDE_DIRS "${XDR_INCLUDE_DIRS2}") # Make the detection fail ENDIF() ENDIF() + FIND_PACKAGE_HANDLE_STANDARD_ARGS(XDR REQUIRED_VARS XDR_INCLUDE_DIRS XDR_LIBRARIES) +ELSE(WIN32) + FIND_LIBRARY(XDR_LIBRARIES NAMES tirpc xdr) + IF(NOT XDR_LIBRARIES) + MESSAGE(STATUS "Could not find XDR libraries ...") + SET(XDR_LIBRARIES) # reset variable tough, as they are not mandatory on some platforms + ELSE() + MESSAGE(STATUS "Found XDR libraries ${XDR_LIBRARIES} ...") + ENDIF() + FIND_PACKAGE_HANDLE_STANDARD_ARGS(XDR REQUIRED_VARS XDR_INCLUDE_DIRS) ENDIF(WIN32) -INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(XDR REQUIRED_VARS XDR_INCLUDE_DIRS)