Salome HOME
b3e855964118f119f5f43f0f65a20d369d09a3d9
[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  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.
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
31 IF (NOT WSO2_FIND_QUIETLY)
32     MESSAGE(STATUS "Looking for WSO2 WSF/C++...")
33 ENDIF ()
34
35 SET(WSO2_ROOT_DIR $ENV{WSO2_ROOT_DIR})
36
37 IF(WSO2_ROOT_DIR)
38   LIST(APPEND CMAKE_PREFIX_PATH "${WSO2_ROOT_DIR}")
39 ENDIF(WSO2_ROOT_DIR)
40
41 FIND_PATH(WSO2_INCLUDE_DIR  WSFDefines.h PATH_SUFFIXES include)
42 # TODO: detect axis includes automatically, without below hardcoded search path
43 FIND_PATH(WSO2_INCLUDE_DIR_axis2 axutil_version.h PATH_SUFFIXES include include/axis2-1.6.0)
44
45 SET(WSO2_INCLUDES ${WSO2_INCLUDE_DIR})
46 IF(WSO2_INCLUDE_DIR_axis2)
47   LIST(APPEND WSO2_INCLUDES ${WSO2_INCLUDE_DIR_axis2} ${WSO2_INCLUDE_DIR_axis2}/platforms)
48 ENDIF()
49
50 FIND_LIBRARY(WSO2_LIBRARY_axutil            NAMES axutil)
51 FIND_LIBRARY(WSO2_LIBRARY_guththila         NAMES guththila)
52 FIND_LIBRARY(WSO2_LIBRARY_neethi            NAMES neethi)
53 FIND_LIBRARY(WSO2_LIBRARY_axis2_parser      NAMES axis2_parser)
54
55 IF(WIN32)
56   FIND_LIBRARY(WSO2_LIBRARY_axis2_axiom       NAMES axiom)
57 ELSE()
58 FIND_LIBRARY(WSO2_LIBRARY_axis2_axiom       NAMES axis2_axiom)
59 FIND_LIBRARY(WSO2_LIBRARY_axis2_http_common NAMES axis2_http_common)
60 ENDIF()
61
62 FIND_LIBRARY(WSO2_LIBRARY_axis2_engine      NAMES axis2_engine)
63 FIND_LIBRARY(WSO2_LIBRARY_wso2_wsf          NAMES wso2_wsf)
64
65 SET(WSO2_LIBRARIES)
66 SET(WSO2_LIBRARIES ${WSO2_LIBRARIES} ${WSO2_LIBRARY_axutil})
67 SET(WSO2_LIBRARIES ${WSO2_LIBRARIES} ${WSO2_LIBRARY_guththila})
68 SET(WSO2_LIBRARIES ${WSO2_LIBRARIES} ${WSO2_LIBRARY_neethi})
69 SET(WSO2_LIBRARIES ${WSO2_LIBRARIES} ${WSO2_LIBRARY_axis2_parser})
70 SET(WSO2_LIBRARIES ${WSO2_LIBRARIES} ${WSO2_LIBRARY_axis2_axiom})
71
72 IF(NOT WIN32)
73 SET(WSO2_LIBRARIES ${WSO2_LIBRARIES} ${WSO2_LIBRARY_axis2_http_common})
74 ENDIF()
75
76 SET(WSO2_LIBRARIES ${WSO2_LIBRARIES} ${WSO2_LIBRARY_axis2_engine})      
77 SET(WSO2_LIBRARIES ${WSO2_LIBRARIES} ${WSO2_LIBRARY_wso2_wsf})
78
79 INCLUDE(FindPackageHandleStandardArgs)
80 FIND_PACKAGE_HANDLE_STANDARD_ARGS(WSO2 REQUIRED_VARS WSO2_INCLUDE_DIR WSO2_INCLUDES WSO2_LIBRARIES)