]> SALOME platform Git repositories - modules/shaper.git/blob - src/ConnectorAPI/CMakeLists.txt
Salome HOME
Improve the correcting orientation in the Filling feature.
[modules/shaper.git] / src / ConnectorAPI / CMakeLists.txt
1 ## Copyright (C) 2014-2017  CEA/DEN, EDF R&D
2 ##
3 ## This library is free software; you can redistribute it and/or
4 ## modify it under the terms of the GNU Lesser General Public
5 ## License as published by the Free Software Foundation; either
6 ## version 2.1 of the License, or (at your option) any later version.
7 ##
8 ## This library is distributed in the hope that it will be useful,
9 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
10 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 ## Lesser General Public License for more details.
12 ##
13 ## You should have received a copy of the GNU Lesser General Public
14 ## License along with this library; if not, write to the Free Software
15 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 ##
17 ## See http:##www.salome-platform.org/ or
18 ## email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
19 ##
20
21 INCLUDE(Common)
22
23 SET(PROJECT_HEADERS
24   ConnectorAPI.h
25   ConnectorAPI_Connector.h
26 )
27
28 SET(PROJECT_SOURCES
29   ConnectorAPI_Connector.cpp
30 )
31
32 SET(PROJECT_LIBRARIES
33   ModelAPI
34   ModelHighAPI
35 )
36
37 INCLUDE_DIRECTORIES(
38   ${PROJECT_SOURCE_DIR}/src/Events
39   ${PROJECT_SOURCE_DIR}/src/ModelAPI
40   ${PROJECT_SOURCE_DIR}/src/ModelHighAPI
41 )
42
43 # Plugin headers dependency
44 INCLUDE_DIRECTORIES(
45   # TODO(spo): modify ConnectorPlugin headers to remove dependency on GeomAPI headers
46   ${PROJECT_SOURCE_DIR}/src/GeomAPI
47   # TODO(spo): it is for *_swig.h files. Can we eliminate it?
48   ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
49   ${PROJECT_SOURCE_DIR}/src/ConnectorPlugin
50 )
51
52 #TODO(spo): is ${CAS_DEFINITIONS} necessary?
53 ADD_DEFINITIONS(-DCONNECTORAPI_EXPORTS ${CAS_DEFINITIONS})
54 ADD_LIBRARY(ConnectorAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
55 TARGET_LINK_LIBRARIES(ConnectorAPI ${PROJECT_LIBRARIES})
56
57 # SWIG wrapper
58
59 INCLUDE(PythonAPI)
60
61 SET_SOURCE_FILES_PROPERTIES(ConnectorAPI.i PROPERTIES CPLUSPLUS ON)
62 SET_SOURCE_FILES_PROPERTIES(ConnectorAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
63
64 #TODO(spo): is ModelAPI necessary or it could be received by INTERFACE_ (may require modern CMake)?
65 SET(SWIG_LINK_LIBRARIES
66   ConnectorAPI
67   ModelHighAPI
68   ModelAPI
69   ${PYTHON_LIBRARIES}
70 )
71
72 SET(SWIG_MODULE_ConnectorAPI_EXTRA_DEPS ${SWIG_MODULE_ConnectorAPI_EXTRA_DEPS}
73   ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i
74   doxyhelp.i
75   ${PROJECT_HEADERS}
76 )
77
78 SWIG_ADD_MODULE(ConnectorAPI python ConnectorAPI.i ${PROJECT_HEADERS})
79 SWIG_LINK_LIBRARIES(ConnectorAPI ${SWIG_LINK_LIBRARIES})
80
81 IF(WIN32)
82   SET_TARGET_PROPERTIES(_ConnectorAPI PROPERTIES DEBUG_OUTPUT_NAME _ConnectorAPI_d)
83 ENDIF(WIN32)
84
85 INSTALL(TARGETS _ConnectorAPI DESTINATION ${SHAPER_INSTALL_SWIG})
86 INSTALL(TARGETS ConnectorAPI DESTINATION ${SHAPER_INSTALL_BIN})
87 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ConnectorAPI.py DESTINATION ${SHAPER_INSTALL_SWIG})
88
89 # Tests
90 IF(${HAVE_SALOME})
91   ENABLE_TESTING()
92   ADD_SUBDIRECTORY(Test)
93 ENDIF(${HAVE_SALOME})