--- /dev/null
+# - Try to find PlaneGCS (sketcher part of FreeCAD)
+# Once done this will define
+#
+# PLANEGCS_FOUND - system has PlaneGCS
+# PLANEGCS_INCLUDE_DIRS - the Plaine include directory
+# PLANEGCS_LIBRARIES - Link these to use PlaneGCS
+
+#=============================================================================
+## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+#=============================================================================
+
+IF(NOT PLANEGCS_FIND_QUIETLY)
+ MESSAGE(STATUS "Try to find PlainGCS at $ENV{PLANEGCS_ROOT_DIR}...")
+ENDIF()
+
+FIND_PATH(PLANEGCS_INCLUDE_DIR NAMES GCS.h
+ HINTS ENV PLANEGCS_ROOT_DIR
+ PATH_SUFFIXES include
+)
+
+FIND_PATH(PLANEGCS_CMAKE_DIR NAMES FindEigen3.cmake
+ HINTS ENV PLANEGCS_ROOT_DIR
+ PATH_SUFFIXES cmake
+)
+
+FIND_LIBRARY(PLANEGCS_LIBRARY NAMES PlaneGCS
+ HINTS ENV PLANEGCS_ROOT_DIR
+ PATH_SUFFIXES lib
+)
+
+# verify Eigen and Boost libraries are found
+FILE(TO_CMAKE_PATH "$ENV{EIGEN_ROOT_DIR}/include/eigen3" EIGEN3_INCLUDE_DIR)
+FILE(TO_CMAKE_PATH "$ENV{BOOST_ROOT_DIR}" BOOST_ROOT)
+SET(CMAKE_MODULE_PATH "${PLANEGCS_CMAKE_DIR}" ${CMAKE_MODULE_PATH})
+FIND_PACKAGE(Eigen3 3.2.5 REQUIRED)
+FIND_PACKAGE(Boost COMPONENTS graph REQUIRED)
+
+IF(Boost_FOUND AND EIGEN3_FOUND)
+ SET(PLANEGCS_INCLUDE_DIRS ${PLANEGCS_INCLUDE_DIR})
+ SET(PLANEGCS_LIBRARIES ${PLANEGCS_LIBRARY})
+ENDIF()
+
+# handle the QUIETLY and REQUIRED arguments and set PLANEGCS_FOUND to TRUE
+# if all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(PlaneGCS
+ REQUIRED_VARS PLANEGCS_LIBRARY PLANEGCS_INCLUDE_DIR)
+
+MARK_AS_ADVANCED(PLANEGCS_LIBRARY PLANEGCS_INCLUDE_DIR)
\ No newline at end of file
)
SET PATH=%SOLVESPACE_ROOT_DIR%\lib;%PATH%
+if "%PLANEGCS_ROOT_DIR%" == "" (
+ SET PLANEGCS_ROOT_DIR=%ROOT_DIR%\products\planegcs-0.16
+)
+SET PATH=%PLANEGCS_ROOT_DIR%\lib;%PATH%
+
+if "%EIGEN_ROOT_DIR%" == "" (
+ SET EIGEN_ROOT_DIR=%ROOT_DIR%\products\eigen-3.2.7
+)
+
+if "%BOOST_ROOT_DIR%" == "" (
+ SET BOOST_ROOT_DIR=%ROOT_DIR%\products\boost-1.52.0
+)
+
cd %SALOME_ROOT_DIR%\WORK
call set_env.bat %1
call "%PDIR%\env_compile.bat"
export LD_LIBRARY_PATH=${SOLVESPACE_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
##
+#------ PlaneGCS ------
+export PLANEGCS_ROOT_DIR=${NEWGEOM_PDIR}/planegcs-0.16
+export LD_LIBRARY_PATH=${PLANEGCS_ROOT_DIR}/lib:${LD_LIBRARY_PATH}
+##
+
+#------ Eigen ------
+export EIGEN_ROOT_DIR=${NEWGEOM_PDIR}/eigen-3.2.7
+##
+
+#------ Boost ------
+export BOOST_ROOT_DIR=${NEWGEOM_PDIR}/boost-1.52.0
+##
+
#------ lcov ------
export LCOV_ROOT_DIR=${NEWGEOM_PDIR}/lcov-1.11
export PATH=${LCOV_ROOT_DIR}/bin:${PATH}
@SET _NO_DEBUG_HEAP=1
@REM -------------------------
+@REM -------------------------
+@SET PLANEGCS_ROOT_DIR=%PDIR%\planegcs-0.16
+@SET PATH=%PLANEGCS_ROOT_DIR%\lib;%PATH%
+@REM -------------------------
+
+@REM -------------------------
+@SET EIGEN_ROOT_DIR=%PDIR%\eigen-3.2.7
+@REM -------------------------
+
+@REM -------------------------
+@SET BOOST_ROOT_DIR=%PDIR%\boost-1.52.0
+@REM -------------------------
+
@REM -------------------------
@REM PTHREAD
@SET PATH=%PDIR%\pthreads-2.9.1\lib;%PATH%
# Include specific solvers
FIND_FILE(SSPath "SolveSpaceSolver/CMakeLists.txt" PATHS "${CMAKE_CURRENT_SOURCE_DIR}")
STRING(COMPARE NOTEQUAL ${SSPath} "SSPath-NOTFOUND" SSPath_FOUND)
-FIND_FILE(GCSPath "PlainGCSSolver/CMakeLists.txt" PATHS "${CMAKE_CURRENT_SOURCE_DIR}")
+FIND_FILE(GCSPath "PlaneGCSSolver/CMakeLists.txt" PATHS "${CMAKE_CURRENT_SOURCE_DIR}")
STRING(COMPARE NOTEQUAL ${GCSPath} "GCSPath-NOTFOUND" GCSPath_FOUND)
IF(${SSPath_FOUND} OR ${GCSPath_FOUND})
ADD_SUBDIRECTORY(SolveSpaceSolver)
ENDIF()
IF(${GCSPath_FOUND})
- MESSAGE(STATUS "PlainGCSSolver plugin found in ${GCSPath}")
- ADD_SUBDIRECTORY(PlainGCSSolver)
+ MESSAGE(STATUS "PlaneGCSSolver plugin found in ${GCSPath}")
+ ADD_SUBDIRECTORY(PlaneGCSSolver)
ENDIF()
ELSE()
MESSAGE(WARNING "No sketch solver plugin is found")