# Find NITE # # This module defines # NITE_FOUND # NITE_INCLUDE_DIRS # NITE_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(NITE_INCLUDE_DIR AND NITE_LIBRARY) SET(NITE_FIND_QUIETLY TRUE) ENDIF() if(WIN32 AND (WIN64 OR (CMAKE_SIZEOF_VOID_P EQUAL 8))) set(NITE_SDK_DIR "$ENV{SCOL_DEPENDENCIES_PATH}/NiTE2/x64" CACHE PATH "NiTE2 SDK path" FORCE) elseif(WIN32) set(NITE_SDK_DIR "$ENV{SCOL_DEPENDENCIES_PATH}/NiTE2/x86" CACHE PATH "NiTE2 SDK path" FORCE) endif() # log message IF (NOT NITE_FIND_QUIETLY) MESSAGE(STATUS "Checking for NITE SDK") ENDIF() # Search for header files FIND_PATH(NITE_INCLUDE_DIR NiTE.h PATHS ${NITE_SDK_DIR}/Include) # Search for libraries files FIND_LIBRARY(NITE_LIBRARY NiTE2 PATHS ${NITE_SDK_DIR}/Lib) # Configure libraries SET(NITE_INCLUDE_DIRS ${NITE_INCLUDE_DIR} CACHE STRING "Directory containing NITE SDK header files") SET(NITE_LIBRARIES ${NITE_LIBRARY} CACHE STRING "NITE SDK libraries files") # Hide those variables in GUI SET(NITE_INCLUDE_DIR ${NITE_INCLUDE_DIR} CACHE INTERNAL "") SET(NITE_LIBRARY ${NITE_LIBRARY} CACHE INTERNAL "") IF(NITE_INCLUDE_DIRS AND NITE_LIBRARY) SET(NITE_FOUND TRUE) ENDIF() # log find result IF(NITE_FOUND) IF(NOT NITE_FIND_QUIETLY) MESSAGE(STATUS " libraries: ${NITE_LIBRARIES}") MESSAGE(STATUS " includes: ${NITE_INCLUDE_DIRS}") ENDIF() ELSE(NITE_FOUND) IF(NOT NITE_LIBRARIES) MESSAGE(STATUS, "NITE SDK library files could not be found") ENDIF() IF(NOT NITE_INCLUDE_DIRS) MESSAGE(STATUS "NITE SDK include files could not be found") ENDIF() ENDIF(NITE_FOUND)