From: spo Date: Fri, 11 Sep 2015 14:25:03 +0000 (+0300) Subject: Issue #830 - cmake must fail if SolveSpace has not been found X-Git-Tag: V_1.4.0_beta4~13 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=9e42f6b2f20d179ca4d5eb5a3c3a4fe4f9985415;p=modules%2Fshaper.git Issue #830 - cmake must fail if SolveSpace has not been found --- diff --git a/CMakeCommon/FindSolveSpace.cmake b/CMakeCommon/FindSolveSpace.cmake index 2830c7bba..426b46c3c 100644 --- a/CMakeCommon/FindSolveSpace.cmake +++ b/CMakeCommon/FindSolveSpace.cmake @@ -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 7f5d89a2b..55f00aa29 100644 --- 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: ===================== diff --git a/src/SketchSolver/CMakeLists.txt b/src/SketchSolver/CMakeLists.txt index a625eeaf1..97441526b 100644 --- a/src/SketchSolver/CMakeLists.txt +++ b/src/SketchSolver/CMakeLists.txt @@ -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 diff --git a/src/SketcherPrs/CMakeLists.txt b/src/SketcherPrs/CMakeLists.txt index dac2c7bb5..3c2b87cf5 100644 --- a/src/SketcherPrs/CMakeLists.txt +++ b/src/SketcherPrs/CMakeLists.txt @@ -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