Salome HOME
Update copyrights 2014.
[tools/simanio.git] / CMakeModules / FindWSO2.cmake
1 # - Find WSO2 WSF/C++
2 # This module finds an installed WSO2 WSF/C++ using the variable WSO2_ROOT_DIR 
3 # as a lookup path.
4 # It sets the following variables:
5 #   WSO2_FOUND       - set to true if WSO2 WSF/C++ is found
6 #   WSO2_INCLUDE_DIR - the directories where the main include files are located
7 #   WSO2_INCLUDES    - the list of directories for headers search path
8 #   WSO2_LIBRARIES   - WSO2 WSF/C++ libraries to be linked against 
9
10 #############################################################
11 # Copyright (C) 2013-2014  CEA/DEN, EDF R&D, OPEN CASCADE
12 #
13 # This library is free software; you can redistribute it and/or
14 # modify it under the terms of the GNU Lesser General Public
15 # License as published by the Free Software Foundation; either
16 # version 2.1 of the License, or (at your option) any later version.
17 #
18 # This library is distributed in the hope that it will be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
21 # Lesser General Public License for more details.
22 #
23 # You should have received a copy of the GNU Lesser General Public
24 # License along with this library; if not, write to the Free Software
25 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
26 #
27 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
28 #
29
30 IF (NOT WSO2_FIND_QUIETLY)
31     MESSAGE(STATUS "Looking for WSO2 WSF/C++...")
32 ENDIF ()
33
34 SET(WSO2_ROOT_DIR $ENV{WSO2_ROOT_DIR})
35
36 IF(WSO2_ROOT_DIR)
37   LIST(APPEND CMAKE_PREFIX_PATH "${WSO2_ROOT_DIR}")
38 ENDIF(WSO2_ROOT_DIR)
39
40 FIND_PATH(WSO2_INCLUDE_DIR  WSFDefines.h PATH_SUFFIXES include)
41 # TODO: detect axis includes automatically, without below hardcoded search path
42 FIND_PATH(WSO2_INCLUDE_DIR_axis2 axutil_version.h PATH_SUFFIXES include include/axis2-1.6.0)
43
44 SET(WSO2_INCLUDES ${WSO2_INCLUDE_DIR})
45 IF(WSO2_INCLUDE_DIR_axis2)
46   LIST(APPEND WSO2_INCLUDES ${WSO2_INCLUDE_DIR_axis2} ${WSO2_INCLUDE_DIR_axis2}/platforms)
47 ENDIF()
48
49 FIND_LIBRARY(WSO2_LIBRARY_axutil            NAMES axutil)
50 FIND_LIBRARY(WSO2_LIBRARY_guththila         NAMES guththila)
51 FIND_LIBRARY(WSO2_LIBRARY_neethi            NAMES neethi)
52 FIND_LIBRARY(WSO2_LIBRARY_axis2_parser      NAMES axis2_parser)
53
54 IF(WIN32)
55   FIND_LIBRARY(WSO2_LIBRARY_axis2_axiom       NAMES axiom)
56 ELSE()
57 FIND_LIBRARY(WSO2_LIBRARY_axis2_axiom       NAMES axis2_axiom)
58 FIND_LIBRARY(WSO2_LIBRARY_axis2_http_common NAMES axis2_http_common)
59 ENDIF()
60
61 FIND_LIBRARY(WSO2_LIBRARY_axis2_engine      NAMES axis2_engine)
62 FIND_LIBRARY(WSO2_LIBRARY_wso2_wsf          NAMES wso2_wsf)
63
64 SET(WSO2_LIBRARIES)
65 SET(WSO2_LIBRARIES ${WSO2_LIBRARIES} ${WSO2_LIBRARY_axutil})
66 SET(WSO2_LIBRARIES ${WSO2_LIBRARIES} ${WSO2_LIBRARY_guththila})
67 SET(WSO2_LIBRARIES ${WSO2_LIBRARIES} ${WSO2_LIBRARY_neethi})
68 SET(WSO2_LIBRARIES ${WSO2_LIBRARIES} ${WSO2_LIBRARY_axis2_parser})
69 SET(WSO2_LIBRARIES ${WSO2_LIBRARIES} ${WSO2_LIBRARY_axis2_axiom})
70
71 IF(NOT WIN32)
72 SET(WSO2_LIBRARIES ${WSO2_LIBRARIES} ${WSO2_LIBRARY_axis2_http_common})
73 ENDIF()
74
75 SET(WSO2_LIBRARIES ${WSO2_LIBRARIES} ${WSO2_LIBRARY_axis2_engine})      
76 SET(WSO2_LIBRARIES ${WSO2_LIBRARIES} ${WSO2_LIBRARY_wso2_wsf})
77
78 INCLUDE(FindPackageHandleStandardArgs)
79 FIND_PACKAGE_HANDLE_STANDARD_ARGS(WSO2 REQUIRED_VARS WSO2_INCLUDE_DIR WSO2_INCLUDES WSO2_LIBRARIES)