From a83a721b2e320a1d4baa00277746c0130c3d1ec2 Mon Sep 17 00:00:00 2001 From: vsr Date: Thu, 14 Nov 2013 06:33:19 +0000 Subject: [PATCH] Adopt for MeshGems v1.1 --- adm_local/cmake_files/FindMESHGEMS.cmake | 28 ++++++++++++------------ 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/adm_local/cmake_files/FindMESHGEMS.cmake b/adm_local/cmake_files/FindMESHGEMS.cmake index 62ddf8b..670d3f6 100644 --- a/adm_local/cmake_files/FindMESHGEMS.cmake +++ b/adm_local/cmake_files/FindMESHGEMS.cmake @@ -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}) -- 2.39.2