Salome HOME
Log desktop actions
[modules/shaper.git] / CMakeCommon / FindSolveSpace.cmake
index 426b46c3ced83c1f1d5050fd9e66e199647b9bd2..c375103987f73d679f815d57a182153b2bae9ba1 100644 (file)
@@ -1,3 +1,22 @@
+# Copyright (C) 2014-2023  CEA, EDF
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
+
 # - Try to  find SolveSpace
 # Once done this will define
 #
 #  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})
-
 IF(NOT SOLVESPACE_FIND_QUIETLY)
-    MESSAGE(STATUS "Try to find SolveSpace at ${_SOLVESPACE_PATHS}...")
+  MESSAGE(STATUS "Try to find SolveSpace at $ENV{SOLVESPACE_ROOT_DIR}...")
 ENDIF()
 
 FIND_PATH(SOLVESPACE_INCLUDE_DIR NAMES slvs.h
-          PATHS ${_SOLVESPACE_PATHS}
-          PATH_SUFFIXES include)
+  HINTS ENV SOLVESPACE_ROOT_DIR
+  PATH_SUFFIXES include
+)
 
 FIND_LIBRARY(SOLVESPACE_LIBRARY NAMES slvs
-             PATHS ${_SOLVESPACE_PATHS}
-             PATH_SUFFIXES lib)
+  HINTS ENV SOLVESPACE_ROOT_DIR
+  PATH_SUFFIXES lib
+)
 
 SET(SOLVESPACE_INCLUDE_DIRS ${SOLVESPACE_INCLUDE_DIR})
 SET(SOLVESPACE_LIBRARIES ${SOLVESPACE_LIBRARY})