Salome HOME
updated copyright message
[modules/shaper.git] / src / SketchSolver / PlaneGCSSolver / CMakeLists.txt
1 # Copyright (C) 2014-2023  CEA, EDF
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 FIND_PACKAGE(PlaneGCS REQUIRED)
21
22 SET(PLANEGCSSOLVER_HEADERS
23     PlaneGCSSolver_Defs.h
24     PlaneGCSSolver_Solver.h
25     PlaneGCSSolver_Storage.h
26     PlaneGCSSolver_ConstraintWrapper.h
27     PlaneGCSSolver_EdgeWrapper.h
28     PlaneGCSSolver_EntityWrapper.h
29     PlaneGCSSolver_PointWrapper.h
30     PlaneGCSSolver_PointArrayWrapper.h
31     PlaneGCSSolver_ScalarWrapper.h
32     PlaneGCSSolver_ScalarArrayWrapper.h
33     PlaneGCSSolver_AngleWrapper.h
34     PlaneGCSSolver_BooleanWrapper.h
35     PlaneGCSSolver_Tools.h
36     PlaneGCSSolver_GeoExtensions.h
37 )
38
39 SET(PLANEGCSSOLVER_SOURCES
40     PlaneGCSSolver_Solver.cpp
41     PlaneGCSSolver_Storage.cpp
42     PlaneGCSSolver_ConstraintWrapper.cpp
43     PlaneGCSSolver_EdgeWrapper.cpp
44     PlaneGCSSolver_PointWrapper.cpp
45     PlaneGCSSolver_PointArrayWrapper.cpp
46     PlaneGCSSolver_ScalarWrapper.cpp
47     PlaneGCSSolver_ScalarArrayWrapper.cpp
48     PlaneGCSSolver_AngleWrapper.cpp
49     PlaneGCSSolver_BooleanWrapper.cpp
50     PlaneGCSSolver_Tools.cpp
51     PlaneGCSSolver_GeoExtensions.cpp
52 )
53
54 SET(PLANEGCSSOLVER_BUILDER_HEADERS
55     PlaneGCSSolver_EntityBuilder.h
56     PlaneGCSSolver_AttributeBuilder.h
57     PlaneGCSSolver_FeatureBuilder.h
58     PlaneGCSSolver_EntityDestroyer.h
59 )
60
61 SET(PLANEGCSSOLVER_BUILDER_SOURCES
62     PlaneGCSSolver_AttributeBuilder.cpp
63     PlaneGCSSolver_FeatureBuilder.cpp
64     PlaneGCSSolver_EntityDestroyer.cpp
65 )
66
67 SET(PLANEGCSSOLVER_UPDATER_HEADERS
68     PlaneGCSSolver_Update.h
69     PlaneGCSSolver_UpdateFeature.h
70     PlaneGCSSolver_UpdateCoincidence.h
71 )
72
73 SET(PLANEGCSSOLVER_UPDATER_SOURCES
74     PlaneGCSSolver_UpdateFeature.cpp
75     PlaneGCSSolver_UpdateCoincidence.cpp
76 )
77
78 SET(PROJECT_LIBRARIES
79     ${PLANEGCS_LIBRARIES}
80     ${SKETCHSOLVER_LIBRARIES}
81 )
82
83 INCLUDE_DIRECTORIES(
84     ${Boost_INCLUDE_DIRS}
85     ${EIGEN3_INCLUDE_DIR}
86     ${PLANEGCS_INCLUDE_DIRS}
87     ${PROJECT_SOURCE_DIR}/src/SketchSolver
88     ${PROJECT_SOURCE_DIR}/src/SketchPlugin
89     ${PROJECT_SOURCE_DIR}/src/ModelAPI
90     ${PROJECT_SOURCE_DIR}/src/GeomAPI
91     ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
92 )
93
94 SOURCE_GROUP ("Resource Files" FILES ${SKETCHSOLVER_TEXT_RESOURCES})
95 SOURCE_GROUP ("Header Files\\Builders" FILES ${PLANEGCSSOLVER_BUILDER_HEADERS})
96 SOURCE_GROUP ("Source Files\\Builders" FILES ${PLANEGCSSOLVER_BUILDER_SOURCES})
97 SOURCE_GROUP ("Header Files\\Updaters" FILES ${PLANEGCSSOLVER_UPDATER_HEADERS})
98 SOURCE_GROUP ("Source Files\\Updaters" FILES ${PLANEGCSSOLVER_UPDATER_SOURCES})
99 SOURCE_GROUP ("Header Files\\SketchSolver" FILES ${SKETCHSOLVER_HEADERS})
100 SOURCE_GROUP ("Source Files\\SketchSolver" FILES ${SKETCHSOLVER_SOURCES})
101 SOURCE_GROUP ("Header Files\\Constraints" FILES ${SKETCHSOLVER_CONSTRAINT_HEADERS})
102 SOURCE_GROUP ("Source Files\\Constraints" FILES ${SKETCHSOLVER_CONSTRAINT_SOURCES})
103 SOURCE_GROUP ("Header Files\\PlaneGCS" FILES ${PLANEGCSSOLVER_HEADERS})
104 SOURCE_GROUP ("Source Files\\PlaneGCS" FILES ${PLANEGCSSOLVER_SOURCES})
105
106 SET(PROJECT_HEADERS
107     ${PLANEGCSSOLVER_HEADERS}
108     ${PLANEGCSSOLVER_BUILDER_HEADERS}
109     ${PLANEGCSSOLVER_UPDATER_HEADERS}
110     ${SKETCHSOLVER_HEADERS}
111     ${SKETCHSOLVER_CONSTRAINT_HEADERS}
112 )
113
114 SET(PROJECT_SOURCES
115     ${PLANEGCSSOLVER_SOURCES}
116     ${PLANEGCSSOLVER_BUILDER_SOURCES}
117     ${PLANEGCSSOLVER_UPDATER_SOURCES}
118     ${SKETCHSOLVER_SOURCES}
119     ${SKETCHSOLVER_CONSTRAINT_SOURCES}
120 )
121
122 if(${SKETCHER_CHANGE_RADIUS_WHEN_MOVE})
123   ADD_DEFINITIONS(-DCHANGE_RADIUS_WHILE_MOVE)
124 endif()
125
126 ##ADD_DEFINITIONS(-Wno-deprecated -Wignored-attributes -Wmisleading-indentation -Wreorder)
127 ADD_DEFINITIONS(-w)
128
129 ADD_LIBRARY(PlaneGCSSolver MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS} ${SKETCHSOLVER_TEXT_RESOURCES})
130 TARGET_LINK_LIBRARIES(PlaneGCSSolver ${PROJECT_LIBRARIES} ${SKETCHSOLVER_LIBRARIES})
131 INSTALL(TARGETS PlaneGCSSolver DESTINATION ${SHAPER_INSTALL_PLUGIN_FILES})
132 INSTALL(FILES ${SKETCHSOLVER_TEXT_RESOURCES} DESTINATION ${SHAPER_INSTALL_XML_RESOURCES})