Salome HOME
Copyright update 2021
[samples/atomic.git] / src / AtomicPy / CMakeLists.txt
1 # Copyright (C) 2013-2021  CEA/DEN, EDF R&D, 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
20 INCLUDE(UseQtExt)
21 INCLUDE(UsePyQt)
22
23 # --- options ---
24 # additional include directories
25 INCLUDE_DIRECTORIES(
26   $(QT_INCLUDES)
27   ${GUI_INCLUDE_DIRS}
28   ${PYTHON_INCLUDE_DIRS}
29   ${SIP_INCLUDE_DIR}
30   ${PROJECT_BINARY_DIR}
31   ${PROJECT_SOURCE_DIR}/src/ATOMICGUI
32 )
33
34 # additional preprocessor / compiler flags
35 ADD_DEFINITIONS(
36   ${QT_DEFINITIONS}
37 )
38
39 # libraries to link to
40 SET(_link_LIBRARIES
41   ${QT_LIBRARIES}
42   ${GUI_LightApp}
43   ATOMIC
44 )
45
46 # --- headers ---
47
48 # header files / no moc processing
49 SET(AtomicPy_HEADERS
50   AtomicPy.h
51 )
52
53 # --- sources ---
54
55 # sources / static
56 SET(_other_SOURCES
57   AtomicPy.cxx
58 )
59
60 # sip files / to be processed by sip
61 SET(_sip_files AtomicPy.sip)
62
63 # sources / sip wrappings
64 PYQT_WRAP_SIP(_sip_SOURCES ${_sip_files})
65
66 # sources / to compile
67 SET(AtomicPy_SOURCES ${_other_SOURCES} ${_sip_SOURCES})
68
69 # --- rules ---
70
71 ADD_LIBRARY(AtomicPy ${AtomicPy_SOURCES})
72 TARGET_LINK_LIBRARIES(AtomicPy ${_link_LIBRARIES})
73 INSTALL(TARGETS AtomicPy EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
74
75 INSTALL(FILES ${AtomicPy_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})