## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
INCLUDE(Common)
-FIND_PACKAGE(SolveSpace REQUIRED)
SET(PROJECT_HEADERS
SketchSolver.h
SketchSolver_Error.h
- SketchSolver_Solver.h
SketchSolver_Constraint.h
SketchSolver_ConstraintAngle.h
SketchSolver_ConstraintCoincidence.h
SketchSolver_ConstraintDistance.h
SketchSolver_ConstraintEqual.h
- SketchSolver_ConstraintFillet.h
SketchSolver_ConstraintLength.h
SketchSolver_ConstraintMirror.h
- SketchSolver_ConstraintRigid.h
+ SketchSolver_ConstraintFixed.h
SketchSolver_ConstraintTangent.h
SketchSolver_ConstraintMulti.h
SketchSolver_ConstraintMultiRotation.h
SketchSolver_ConstraintMultiTranslation.h
SketchSolver_ConstraintMovement.h
- SketchSolver_Builder.h
SketchSolver_Group.h
- SketchSolver_ConstraintManager.h
+ SketchSolver_Builder.h
+ SketchSolver_IConstraintWrapper.h
+ SketchSolver_IEntityWrapper.h
+ SketchSolver_IParameterWrapper.h
+ SketchSolver_ISolver.h
+ SketchSolver_Manager.h
SketchSolver_Storage.h
- SketchSolver_FeatureStorage.h
)
SET(PROJECT_SOURCES
- SketchSolver_Solver.cpp
SketchSolver_Constraint.cpp
SketchSolver_ConstraintAngle.cpp
SketchSolver_ConstraintCoincidence.cpp
SketchSolver_ConstraintDistance.cpp
SketchSolver_ConstraintEqual.cpp
- SketchSolver_ConstraintFillet.cpp
SketchSolver_ConstraintLength.cpp
SketchSolver_ConstraintMirror.cpp
- SketchSolver_ConstraintRigid.cpp
+ SketchSolver_ConstraintFixed.cpp
SketchSolver_ConstraintTangent.cpp
SketchSolver_ConstraintMulti.cpp
SketchSolver_ConstraintMultiRotation.cpp
SketchSolver_ConstraintMultiTranslation.cpp
SketchSolver_ConstraintMovement.cpp
- SketchSolver_Builder.cpp
SketchSolver_Group.cpp
- SketchSolver_ConstraintManager.cpp
+ SketchSolver_Builder.cpp
+ SketchSolver_Manager.cpp
SketchSolver_Storage.cpp
- SketchSolver_FeatureStorage.cpp
)
SET(PROJECT_LIBRARIES
- ${SOLVESPACE_LIBRARIES}
Config
Events
ModelAPI
GeomAPI
+ GeomDataAPI
)
INCLUDE_DIRECTORIES(
- ${SOLVESPACE_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/src/Config
${PROJECT_SOURCE_DIR}/src/SketchPlugin
${PROJECT_SOURCE_DIR}/src/ModelAPI
ADD_DEFINITIONS(-DSKETCHSOLVER_EXPORTS)
-ADD_LIBRARY(SketchSolver MODULE ${PROJECT_SOURCES} ${PROJECT_HEADERS}
+ADD_LIBRARY(SketchSolver SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS}
)
TARGET_LINK_LIBRARIES(SketchSolver ${PROJECT_LIBRARIES}
)
INSTALL(TARGETS SketchSolver DESTINATION plugins)
+
+
+# Include specific solvers
+IF(NO_SolveSpace)
+ SET(SSPath_FOUND FALSE)
+ELSE()
+ FIND_FILE(SSPath "SolveSpaceSolver/CMakeLists.txt" PATHS "${CMAKE_CURRENT_SOURCE_DIR}")
+ STRING(COMPARE NOTEQUAL ${SSPath} "SSPath-NOTFOUND" SSPath_FOUND)
+ENDIF()
+
+IF(NO_PlaneGCS)
+ SET(GCSPath_FOUND FALSE)
+ELSE()
+ FIND_FILE(GCSPath "PlaneGCSSolver/CMakeLists.txt" PATHS "${CMAKE_CURRENT_SOURCE_DIR}")
+ STRING(COMPARE NOTEQUAL ${GCSPath} "GCSPath-NOTFOUND" GCSPath_FOUND)
+ENDIF()
+
+IF(${SSPath_FOUND} OR ${GCSPath_FOUND})
+ IF(${SSPath_FOUND})
+ MESSAGE(STATUS "SolveSpaceSolver plugin found in ${SSPath}")
+ ADD_SUBDIRECTORY(SolveSpaceSolver)
+ ENDIF()
+ IF(${GCSPath_FOUND})
+ MESSAGE(STATUS "PlaneGCSSolver plugin found in ${GCSPath}")
+ ADD_SUBDIRECTORY(PlaneGCSSolver)
+ ENDIF()
+ELSE()
+ MESSAGE(WARNING "No sketch solver plugin is found")
+ENDIF()