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