# Find Glove5DT # # This module defines # Glove5DT_FOUND # Glove5DT_INCLUDE_DIRS # Glove5DT_LIBRARIES # # Copyright (c) 2012 I-maginer # # This program 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 of the License, or (at your option) any later # version. # # This program 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 program; if not, write to the Free Software Foundation, Inc., 59 Temple # Place - Suite 330, Boston, MA 02111-1307, USA, or go to # http://www.gnu.org/copyleft/lesser.txt # if (WIN32) include(FindPkgMacros) findpkg_begin(Glove5DT) # Get path, convert backslashes as ${ENV_${var}} getenv_path(GLOVE5DT) # construct search paths set(Glove5DT_PREFIX_PATH ${GLOVE5DT_HOME} "$ENV{SCOL_DEPENDENCIES_PATH}/glove5dt/5DTDataGloveUltra_SDK_WindowsC_v2.3_13Sept2011/Visual Studio/" ) create_search_paths(Glove5DT) # redo search if prefix path changed clear_if_changed(Glove5DT_PREFIX_PATH Glove5DT_LIBRARY_FWK Glove5DT_LIBRARY_REL Glove5DT_LIBRARY_DBG Glove5DT_INCLUDE_DIR ) if(WIN32 AND (WIN64 OR (CMAKE_SIZEOF_VOID_P EQUAL 8))) set(Glove5DT_LIBRARY_NAMES fglove64) elseif (WIN32) set(Glove5DT_LIBRARY_NAMES fglove) endif () get_debug_names(Glove5DT_LIBRARY_NAMES) findpkg_framework(Glove5DT) #message(alert ${Glove5DT_INC_SEARCH_PATH}) find_path(Glove5DT_INCLUDE_DIR NAMES fglove.h HINTS ${Glove5DT_INC_SEARCH_PATH}) find_library(Glove5DT_LIBRARY_REL NAMES ${Glove5DT_LIBRARY_NAMES} HINTS ${Glove5DT_LIB_SEARCH_PATH}) find_library(Glove5DT_LIBRARY_DBG NAMES ${Glove5DT_LIBRARY_NAMES_DBG} HINTS ${Glove5DT_LIB_SEARCH_PATH}) find_file(Glove5DT_BINARY_REL NAMES ${Glove5DT_LIBRARY_NAMES}.dll HINTS ${Glove5DT_BIN_SEARCH_PATH}) find_file(Glove5DT_BINARY_DBG NAMES ${Glove5DT_LIBRARY_NAMES}.dll HINTS ${Glove5DT_BIN_SEARCH_PATH}) make_library_set(Glove5DT_LIBRARY) findpkg_finish(Glove5DT) endif (WIN32)