1 # Copyright (C) 2014-2019 CEA/DEN, EDF R&D
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.
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.
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
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 ParametersAPI_Parameter.h
28 ParametersAPI_Parameter.cpp
37 ${PROJECT_SOURCE_DIR}/src/Events
38 ${PROJECT_SOURCE_DIR}/src/ModelAPI
39 ${PROJECT_SOURCE_DIR}/src/ModelHighAPI
42 # Plugin headers dependency
44 # TODO(spo): modify ParametersPlugin headers to remove dependency on GeomAPI headers
45 ${PROJECT_SOURCE_DIR}/src/GeomAPI
46 # TODO(spo): it is for *_swig.h files. Can we eliminate it?
47 ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
48 ${PROJECT_SOURCE_DIR}/src/ParametersPlugin
51 #TODO(spo): is ${OpenCASCADE_DEFINITIONS} necessary?
52 ADD_DEFINITIONS(-DPARAMETERSAPI_EXPORTS ${OpenCASCADE_DEFINITIONS})
53 ADD_LIBRARY(ParametersAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
54 TARGET_LINK_LIBRARIES(ParametersAPI ${PROJECT_LIBRARIES})
60 SET(CMAKE_SWIG_FLAGS -threads -w325,321,302,362,322,383,403)
62 SET_SOURCE_FILES_PROPERTIES(ParametersAPI.i PROPERTIES CPLUSPLUS ON)
63 SET_SOURCE_FILES_PROPERTIES(ParametersAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
65 #TODO(spo): is ModelAPI necessary or it could be received by INTERFACE_ (may require modern CMake)?
66 SET(SWIG_LINK_LIBRARIES
73 SET(SWIG_MODULE_ParametersAPI_EXTRA_DEPS ${SWIG_MODULE_ParametersAPI_EXTRA_DEPS}
74 ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i
79 IF(${CMAKE_VERSION} VERSION_GREATER "3.8.0")
80 SWIG_ADD_LIBRARY(ParametersAPI LANGUAGE python SOURCES ParametersAPI.i ${PROJECT_HEADERS})
82 SWIG_ADD_MODULE(ParametersAPI python ParametersAPI.i ${PROJECT_HEADERS})
84 SWIG_LINK_LIBRARIES(ParametersAPI ${SWIG_LINK_LIBRARIES})
87 SET_TARGET_PROPERTIES(_ParametersAPI PROPERTIES DEBUG_OUTPUT_NAME _ParametersAPI_d)
90 INSTALL(TARGETS _ParametersAPI DESTINATION ${SHAPER_INSTALL_SWIG})
91 INSTALL(TARGETS ParametersAPI DESTINATION ${SHAPER_INSTALL_BIN})
92 INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/ParametersAPI.py DESTINATION ${SHAPER_INSTALL_SWIG})