Salome HOME
Updated copyright comment
[modules/gui.git] / tools / PyConsole / src / python / CMakeLists.txt
1 # Copyright (C) 2015-2024  CEA, EDF, OPEN CASCADE
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 email : webmaster.salome@opencascade.com
18 #
19 # Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
20 #
21
22 INCLUDE(UseQtExt)
23 INCLUDE(UsePyQt)
24
25 # --- options ---
26
27 # additional include directories
28 INCLUDE_DIRECTORIES(
29   $(QT_INCLUDES)
30   ${PYTHON_INCLUDE_DIRS}
31   ${SIP_INCLUDE_DIR}
32   ${PROJECT_BINARY_DIR}
33   ${CMAKE_CURRENT_SOURCE_DIR}/..
34 )
35
36 # additional preprocessor / compiler flags
37 ADD_DEFINITIONS(${QT_DEFINITIONS})
38
39 # libraries to link to
40 SET(_link_LIBRARIES ${QT_LIBRARIES} ${PYTHON_LIBRARIES} PyConsole)
41
42 # --- sources ---
43
44 # sip files / to be processed by sip
45 SET(_sip_files PyConsolePy.sip)
46
47 # sources / sip wrappings
48 PYQT_WRAP_SIP(_sip_SOURCES ${_sip_files})
49
50 # sources / to compile
51 SET(PyConsolePy_SOURCES ${_sip_SOURCES})
52
53 # --- rules ---
54
55 ADD_LIBRARY(PyConsolePy ${PyConsolePy_SOURCES})
56 IF(WIN32)
57   SET_TARGET_PROPERTIES(PyConsolePy PROPERTIES SUFFIX ".pyd" DEBUG_OUTPUT_NAME PyConsolePy_d RELEASE_OUTPUT_NAME PyConsolePy)
58 ELSE()
59   SET_TARGET_PROPERTIES(PyConsolePy PROPERTIES PREFIX "")
60 ENDIF()
61 TARGET_LINK_LIBRARIES(PyConsolePy ${_link_LIBRARIES})
62 INSTALL(TARGETS PyConsolePy EXPORT ${PYCONSOLE_EXPORT_NAME}TargetGroup DESTINATION ${PYCONSOLE_INSTALL_PYTHON})