]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #830 - cmake must fail if SolveSpace has not been found
authorspo <sergey.pokhodenko@opencascade.com>
Fri, 11 Sep 2015 14:25:03 +0000 (17:25 +0300)
committerspo <sergey.pokhodenko@opencascade.com>
Fri, 11 Sep 2015 14:25:22 +0000 (17:25 +0300)
CMakeCommon/FindSolveSpace.cmake
README
src/SketchSolver/CMakeLists.txt
src/SketcherPrs/CMakeLists.txt

index 2830c7bba7bdb7dc26cf3b9e32f440923823e938..426b46c3ced83c1f1d5050fd9e66e199647b9bd2 100644 (file)
@@ -1,35 +1,35 @@
 # - Try to  find SolveSpace
 # Once done this will define
 #
-#  SolveSpace_FOUND - system has SolveSpace
-#  SolveSpace_INCLUDE_DIRS - the SolveSpace include directory
-#  SolveSpace_LIBRARIES - Link these to use SolveSpace
+#  SOLVESPACE_FOUND - system has SolveSpace
+#  SOLVESPACE_INCLUDE_DIRS - the SolveSpace include directory
+#  SOLVESPACE_LIBRARIES - Link these to use SolveSpace
 
 #=============================================================================
 ## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 #=============================================================================
 
-SET(_SolveSpace_PATHS $ENV{SOLVESPACE_ROOT_DIR})
+SET(_SOLVESPACE_PATHS $ENV{SOLVESPACE_ROOT_DIR})
 
-FIND_PATH(SolveSpace_INCLUDE_DIR NAMES slvs.h
-          PATHS ${_SolveSpace_PATHS}
+IF(NOT SOLVESPACE_FIND_QUIETLY)
+    MESSAGE(STATUS "Try to find SolveSpace at ${_SOLVESPACE_PATHS}...")
+ENDIF()
+
+FIND_PATH(SOLVESPACE_INCLUDE_DIR NAMES slvs.h
+          PATHS ${_SOLVESPACE_PATHS}
           PATH_SUFFIXES include)
 
-FIND_LIBRARY(SolveSpace_LIBRARY NAMES slvs
-             PATHS ${_SolveSpace_PATHS}
+FIND_LIBRARY(SOLVESPACE_LIBRARY NAMES slvs
+             PATHS ${_SOLVESPACE_PATHS}
              PATH_SUFFIXES lib)
 
-SET(SolveSpace_INCLUDE_DIRS ${SolveSpace_INCLUDE_DIR})
-SET(SolveSpace_LIBRARIES ${SolveSpace_LIBRARY})
+SET(SOLVESPACE_INCLUDE_DIRS ${SOLVESPACE_INCLUDE_DIR})
+SET(SOLVESPACE_LIBRARIES ${SOLVESPACE_LIBRARY})
 
-INCLUDE(FindPackageHandleStandardArgs)
-# handle the QUIETLY and REQUIRED arguments and set SolveSpace_FOUND to TRUE
+# handle the QUIETLY and REQUIRED arguments and set SOLVESPACE_FOUND to TRUE
 # if all listed variables are TRUE
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(SolveSpace DEFAULT_MSG
-                                  SolveSpace_LIBRARY SolveSpace_INCLUDE_DIR)
-
-MARK_AS_ADVANCED(SolveSpace_LIBRARY SolveSpace_INCLUDE_DIR)
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(SolveSpace
+                                  REQUIRED_VARS SOLVESPACE_LIBRARY SOLVESPACE_INCLUDE_DIR)
 
-IF(NOT SolveSpace_FIND_QUIET)
-    MESSAGE(STATUS "SolveSpace found at ${_SolveSpace_PATHS}")
-ENDIF()
\ No newline at end of file
+MARK_AS_ADVANCED(SOLVESPACE_LIBRARY SOLVESPACE_INCLUDE_DIR)
\ No newline at end of file
diff --git a/README b/README
index 7f5d89a2b0f62935dfc56fca59a9b20b11b5e3dc..55f00aa297f97212cdb628b8bc1c4ab143ecbd8e 100644 (file)
--- a/README
+++ b/README
@@ -1,5 +1,4 @@
-NewGEOM version 0.2 (end of development phase 2 result).
-
+NewGEOM version 1.4.0
 
 Compilation on LINUX:
 =====================
index a625eeaf1df590bc9ae3f03e29e1137c5916838e..97441526be0b1feb9d2aa7b23a42abca4265b12b 100644 (file)
@@ -52,7 +52,7 @@ SET(PROJECT_SOURCES
 )
 
 SET(PROJECT_LIBRARIES
-    ${SolveSpace_LIBRARIES}
+    ${SOLVESPACE_LIBRARIES}
     Config
     Events
     ModelAPI
@@ -60,7 +60,7 @@ SET(PROJECT_LIBRARIES
 )
 
 INCLUDE_DIRECTORIES(
-    ${SolveSpace_INCLUDE_DIRS}
+    ${SOLVESPACE_INCLUDE_DIRS}
     ${PROJECT_SOURCE_DIR}/src/Config
     ${PROJECT_SOURCE_DIR}/src/SketchPlugin
     ${PROJECT_SOURCE_DIR}/src/ModelAPI
index dac2c7bb506e1956eb655775db7a4806772a35eb..3c2b87cf5c440733e275bafd41cd9fd77546cd85 100644 (file)
@@ -1,5 +1,10 @@
 ## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 
+IF(NOT DEFINED ENV{FREETYPE_DIR})
+    SET(ENV{FREETYPE_DIR} $ENV{FREETYPE_ROOT_DIR})
+ENDIF()
+FIND_PACKAGE(Freetype REQUIRED)
+
 SET(PROJECT_HEADERS
     SketcherPrs.h
     SketcherPrs_Coincident.h
@@ -8,17 +13,17 @@ SET(PROJECT_HEADERS
     SketcherPrs_Tools.h
     SketcherPrs_Perpendicular.h
     SketcherPrs_SymbolPrs.h
-       SketcherPrs_PositionMgr.h
-       SketcherPrs_Rigid.h
-       SketcherPrs_HVDirection.h
-       SketcherPrs_Equal.h
-       SketcherPrs_Tangent.h
-       SketcherPrs_SensitivePoint.h
-       SketcherPrs_Radius.h
-       SketcherPrs_LengthDimension.h
-       SketcherPrs_Mirror.h
-       SketcherPrs_Transformation.h
-       SketcherPrs_Angle.h
+    SketcherPrs_PositionMgr.h
+    SketcherPrs_Rigid.h
+    SketcherPrs_HVDirection.h
+    SketcherPrs_Equal.h
+    SketcherPrs_Tangent.h
+    SketcherPrs_SensitivePoint.h
+    SketcherPrs_Radius.h
+    SketcherPrs_LengthDimension.h
+    SketcherPrs_Mirror.h
+    SketcherPrs_Transformation.h
+    SketcherPrs_Angle.h
 )
 
 SET(PROJECT_SOURCES
@@ -28,33 +33,34 @@ SET(PROJECT_SOURCES
     SketcherPrs_Tools.cpp
     SketcherPrs_Perpendicular.cpp
     SketcherPrs_SymbolPrs.cpp
-       SketcherPrs_PositionMgr.cpp
-       SketcherPrs_Rigid.cpp
-       SketcherPrs_HVDirection.cpp
-       SketcherPrs_Equal.cpp
-       SketcherPrs_Tangent.cpp
-       SketcherPrs_SensitivePoint.cpp
-       SketcherPrs_Radius.cpp
-       SketcherPrs_LengthDimension.cpp
-       SketcherPrs_Mirror.cpp
-       SketcherPrs_Transformation.cpp
-       SketcherPrs_Angle.cpp
+    SketcherPrs_PositionMgr.cpp
+    SketcherPrs_Rigid.cpp
+    SketcherPrs_HVDirection.cpp
+    SketcherPrs_Equal.cpp
+    SketcherPrs_Tangent.cpp
+    SketcherPrs_SensitivePoint.cpp
+    SketcherPrs_Radius.cpp
+    SketcherPrs_LengthDimension.cpp
+    SketcherPrs_Mirror.cpp
+    SketcherPrs_Transformation.cpp
+    SketcherPrs_Angle.cpp
 )
 
 SET(PROJECT_LIBRARIES
     Config
     ModelAPI
     GeomAPI
-       Events
-    ${CAS_KERNEL} 
-    ${CAS_MODELER} 
+    Events
+    ${CAS_KERNEL}
+    ${CAS_MODELER}
     ${CAS_VIEWER}
     ${CAS_SHAPE}
     ${CAS_TKTopAlgo}
     ${CAS_TKOpenGl}
+    ${FREETYPE_LIBRARIES}
 )
 
-IF(WIN32) 
+IF(WIN32)
     SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} opengl32)
 ELSE()
     SET(PROJECT_LIBRARIES ${PROJECT_LIBRARIES} GL)
@@ -64,14 +70,14 @@ ENDIF()
 SET(PROJECT_PICTURES
     icons/parallel.png
     icons/perpendicular.png
-       icons/anchor.png
-       icons/horisontal.png
-       icons/vertical.png
-       icons/equal.png
-       icons/tangent.png
-       icons/mirror.png
-       icons/rotate.png
-       icons/translate.png
+    icons/anchor.png
+    icons/horisontal.png
+    icons/vertical.png
+    icons/equal.png
+    icons/tangent.png
+    icons/mirror.png
+    icons/rotate.png
+    icons/translate.png
 )
 
 ADD_DEFINITIONS(-DSKETCHERPRS_EXPORTS ${CAS_DEFINITIONS})
@@ -85,11 +91,10 @@ INCLUDE_DIRECTORIES(
   ${PROJECT_SOURCE_DIR}/src/GeomDataAPI
   ${PROJECT_SOURCE_DIR}/src/SketchPlugin
   ${CAS_INCLUDE_DIRS}
-  $ENV{FREETYPE_ROOT_DIR}/include
-  $ENV{FREETYPE_ROOT_DIR}/include/freetype2
+  ${FREETYPE_INCLUDE_DIRS}
 )
 
 TARGET_LINK_LIBRARIES(SketcherPrs ${PROJECT_LIBRARIES})
 
 INSTALL(TARGETS SketcherPrs DESTINATION bin)
-INSTALL(FILES ${PROJECT_PICTURES} DESTINATION resources)
+INSTALL(FILES ${PROJECT_PICTURES} DESTINATION resources)
\ No newline at end of file