]> SALOME platform Git repositories - plugins/blsurfplugin.git/commitdiff
Salome HOME
Adopt for MeshGems v1.1
authorvsr <vsr@opencascade.com>
Thu, 14 Nov 2013 06:33:19 +0000 (06:33 +0000)
committervsr <vsr@opencascade.com>
Thu, 14 Nov 2013 06:33:19 +0000 (06:33 +0000)
adm_local/cmake_files/FindMESHGEMS.cmake

index 62ddf8bb551c103ca19697b4d8cc46bef8a028eb..670d3f6defea90b9af2b064d81469215e68beadb 100644 (file)
@@ -31,26 +31,26 @@ MESSAGE(STATUS "Check for MESHGEMS ...")
 
 SET(MESHGEMS_ROOT_DIR $ENV{MESHGEMS_ROOT_DIR})
 
-FIND_PATH(MESHGEMS_INCLUDE_DIRS meshgems/cadsurf.h ${MESHGEMS_ROOT_DIR}/include)
+FIND_PATH(MESHGEMS_INCLUDE_DIRS meshgems/cadsurf.h HINTS ${MESHGEMS_ROOT_DIR} PATH_SUFFIXES include)
 
-SET(CADSURF_LIBS_PATHS)
-SET(CADSURF_LIBS_PATHS ${CADSURF_LIBS_PATHS} ${MESHGEMS_ROOT_DIR}/lib)
-
-SET(suff)
 IF(MACHINE_IS_64)
-  SET(suff "_64")
+  SET(_suff "_64")
+ELSE()
+  SET(_suff)
 ENDIF(MACHINE_IS_64)
-
-IF(WIN32)
-  SET(CADSURF_LIBS_PATHS ${CADSURF_LIBS_PATHS} ${MESHGEMS_ROOT_DIR}/lib/WinXP${suff}_VC9)
-ELSE(WIN32)
-  SET(CADSURF_LIBS_PATHS ${CADSURF_LIBS_PATHS} ${MESHGEMS_ROOT_DIR}/lib/Linux${suff})
+IF(WIN32)      
+  SET(_plt WinXP${_suff}_VC9 WinXP${_suff}_VC10)
+ELSE()
+  SET(_plt Linux${_suff})
 ENDIF(WIN32)
 
-FIND_LIBRARY(mg-cadsurf mg-cadsurf PATHS ${CADSURF_LIBS_PATHS})
-FIND_LIBRARY(mg-precad mg-precad PATHS ${CADSURF_LIBS_PATHS})
-FIND_LIBRARY(meshgems meshgems PATHS ${CADSURF_LIBS_PATHS})
+SET(CADSURF_LIBS_PATHS ${MESHGEMS_ROOT_DIR}/lib)
+
+FIND_LIBRARY(mg-cadsurf mg-cadsurf PATHS ${CADSURF_LIBS_PATHS} PATH_SUFFIXES ${_plt})
+FIND_LIBRARY(mg-precad mg-precad PATHS ${CADSURF_LIBS_PATHS} PATH_SUFFIXES ${_plt})
+FIND_LIBRARY(meshgems meshgems PATHS ${CADSURF_LIBS_PATHS} PATH_SUFFIXES ${_plt})
 
+# TODO: search all components
 SET(MESHGEMS_LIBRARIES)
 SET(MESHGEMS_LIBRARIES ${MESHGEMS_LIBRARIES} ${mg-cadsurf})
 SET(MESHGEMS_LIBRARIES ${MESHGEMS_LIBRARIES} ${mg-precad})