# Copyright (C) 2014-2015 OPEN CASCADE # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # IF(SALOME_BUILD_GUI) INCLUDE(UseQtExt) ENDIF() # --- options --- # additional include directories INCLUDE_DIRECTORIES( ${CAS_INCLUDE_DIRS} ${XT_INCLUDE_DIRS} ${KERNEL_INCLUDE_DIRS} ${GEOM_INCLUDE_DIRS} ${PROJECT_BINARY_DIR} ${PROJECT_BINARY_DIR}/idl ${CMAKE_CURRENT_BINARY_DIR} ) IF(SALOME_BUILD_GUI) INCLUDE_DIRECTORIES( ${QT_INCLUDE_DIRS} ${GUI_INCLUDE_DIRS} ) ENDIF() # additional preprocessor / compiler flags ADD_DEFINITIONS( ${CAS_DEFINITIONS} ) IF(SALOME_BUILD_GUI) ADD_DEFINITIONS( ${QT_DEFINITIONS} ) ENDIF() # libraries to link to SET(_link_engine_LIBRARIES ${CAS_TKXSBase} ${XT_LIBRARIES} ${KERNEL_SALOMEBasics} ${KERNEL_SALOMELocalTrace} ${KERNEL_OpUtil} ${GEOM_SalomeIDLGEOM} ${GEOM_GEOMEngine} ${GEOM_GEOMImpl} ${GEOM_GEOMClient} SalomeIDLXTPlugin ) IF(SALOME_BUILD_GUI) SET(_link_gui_LIBRARIES SalomeIDLXTPlugin ${GEOM_GEOMObject} ${GEOM_GEOMBase} ${GEOM_GEOMBase} ) ENDIF() # --- headers --- SET(XTPluginEngine_HEADERS XTPlugin_IOperations_i.hh XTPlugin_Engine.hxx XTPlugin_OperationsCreator.hxx XTPlugin_IOperations.hxx XTPlugin_IImport.hxx XTPlugin_ImportDriver.hxx XTPlugin_IECallBack.hxx ) IF(SALOME_BUILD_GUI) # header files / to be processed by moc SET(_moc_HEADERS XTPlugin_GUI.h ) ENDIF() # --- sources --- IF(SALOME_BUILD_GUI) # sources / moc wrappings QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS}) SET(XTPluginGUI_SOURCES XTPlugin_GUI.cxx ${_moc_SOURCES} ) ENDIF() SET(XTPluginEngine_SOURCES XTPlugin_Engine.cxx XTPlugin_OperationsCreator.cxx XTPlugin_IOperations_i.cc XTPlugin_IOperations.cxx XTPlugin_ImportDriver.cxx XTPlugin_IECallBack.cxx ) # resource files / to be processed by lrelease SET(XTPlugin_RESOURCES resources/XTPlugin_msg_en.ts resources/XTPlugin_msg_fr.ts resources/XTPlugin_msg_ja.ts ) # XT plugin scripts SET(_python_XT_SCRIPTS XTPluginBuilder.py __init__.py ) # --- rules --- # install Engine library ADD_LIBRARY(XTPluginEngine ${XTPluginEngine_SOURCES}) TARGET_LINK_LIBRARIES(XTPluginEngine ${_link_engine_LIBRARIES}) INSTALL(TARGETS XTPluginEngine EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) # install GUI library IF(SALOME_BUILD_GUI) ADD_LIBRARY(XTPluginGUI ${XTPluginGUI_SOURCES}) TARGET_LINK_LIBRARIES(XTPluginGUI ${_link_gui_LIBRARIES}) INSTALL(TARGETS XTPluginGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) # install resources QT_INSTALL_TS_RESOURCES("${XTPlugin_RESOURCES}" "${SALOME_XTPLUGIN_INSTALL_RES_DATA}") ENDIF() # install headers INSTALL(FILES ${XTPluginEngine_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS}) # install python scripts SALOME_INSTALL_SCRIPTS("${_python_XT_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/XTPlugin DEF_PERMS) # configure license file CONFIGURE_FILE(XTPlugin_license.h.in XTPlugin_license.h)