# Find IViewX # # This module defines # IViewX_FOUND # IViewX_INCLUDE_DIRS # IViewX_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 # # On a new cmake run, we do not need to be verbose IF(IViewX_INCLUDE_DIR AND IViewX_LIBRARY) SET(IViewX_FIND_QUIETLY TRUE) ENDIF() # If IViewX_ROOT was defined in the environment, use it. if (NOT $ENV{IVIEWX_ROOT} STREQUAL "") set(IViewX_ROOT $ENV{IVIEWX_ROOT}) else() set(IViewX_ROOT $ENV{PATH}) endif() # log message IF (NOT IViewX_FIND_QUIETLY) MESSAGE(STATUS "Checking for SMI IView X SDK") ENDIF() # Search for header files FIND_PATH(IViewX_INCLUDE_DIR iViewXAPI.h PATHS ${IViewX_ROOT}/include) # Search for libraries files FIND_LIBRARY(IViewX_LIBRARY iViewXAPI PATHS ${IViewX_ROOT}/lib) # Configure libraries SET(IViewX_INCLUDE_DIRS ${IViewX_INCLUDE_DIR} CACHE STRING "Directory containing SMI IView X SDK header files") SET(IViewX_LIBRARIES ${IViewX_LIBRARY} CACHE STRING "SMI IView X SDK libraries files") # Hide those variables in GUI SET(IViewX_INCLUDE_DIR ${IViewX_INCLUDE_DIR} CACHE INTERNAL "") SET(IViewX_LIBRARY ${IViewX_LIBRARY} CACHE INTERNAL "") IF(IViewX_INCLUDE_DIRS AND IViewX_LIBRARY) SET(IViewX_FOUND TRUE) ENDIF() # log find result IF(IViewX_FOUND) IF(NOT IViewX_FIND_QUIETLY) MESSAGE(STATUS " libraries: ${IViewX_LIBRARIES}") MESSAGE(STATUS " includes: ${IViewX_INCLUDE_DIRS}") ENDIF() ELSE(IViewX_FOUND) IF(NOT IViewX_LIBRARIES) MESSAGE(STATUS, "IViewX SDK library files could not be found") ENDIF() IF(NOT IViewX_INCLUDE_DIRS) MESSAGE(STATUS "IViewX SDK include files could not be found") ENDIF() ENDIF(IViewX_FOUND)