Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/network/cmake/FindOIS.cmake @ 1542

Last change on this file since 1542 was 1505, checked in by rgrieder, 17 years ago

f* svn: It doesn't even inform you if you attempt to set a non existing property. It is svn:eol-style and not eol-style when using the command by the way…

  • Property svn:eol-style set to native
File size: 1.9 KB
Line 
1# Find OIS includes and library
2#
3# This module defines
4#  OIS_INCLUDE_DIR
5#  OIS_LIBRARIES, the libraries to link against to use OIS.
6#  OIS_LIB_DIR, the location of the libraries
7#  OIS_FOUND, If false, do not try to use OIS
8#
9# Created by Matt Williams to find OGRE libraries
10# Copyright © 2007, Matt Williams
11#
12# Modified by Nicolas Schlumberger to find OIS libraries
13# and make it run on the Tardis-Infrastucture of the ETH Zurich
14# Copyright 2007, Nicolas Schlumberger
15#
16# Redistribution and use is allowed according to the terms of the BSD license.
17
18IF (OIS_LIBRARIES AND OIS_INCLUDE_DIR)
19    SET(OIS_FIND_QUIETLY TRUE) # Already in cache, be silent
20ENDIF (OIS_LIBRARIES AND OIS_INCLUDE_DIR)
21
22IF (WIN32) #Windows
23    MESSAGE(STATUS "Looking for OIS")
24    SET(OIS_INCLUDE_DIR ../libs/ogre/Dependencies/include)
25    SET(OIS_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../libs/ogre/Samples/Common/bin/Release)
26    SET(OIS_LIBRARIES debug OIS_d optimized OIS)
27ELSE (WIN32) #Unix
28    FIND_PACKAGE(PkgConfig)
29    PKG_SEARCH_MODULE(OIS OIS /usr/pack/ois-1.0-sd/i686-debian-linux3.1/lib/pkgconfig/OIS.pc) # tardis specific hack
30    SET(OIS_INCLUDE_DIR ${OIS_INCLUDE_DIRS})
31    SET(OIS_LIB_DIR ${OIS_LIBDIR})
32    SET(OIS_LIBRARIES ${OIS_LIBRARIES} CACHE STRING "")
33ENDIF (WIN32)
34
35#Do some preparation
36SEPARATE_ARGUMENTS(OIS_INCLUDE_DIR)
37SEPARATE_ARGUMENTS(OIS_LIBRARIES)
38
39SET(OIS_INCLUDE_DIR ${OIS_INCLUDE_DIR} CACHE PATH "")
40SET(OIS_LIBRARIES ${OIS_LIBRARIES} CACHE STRING "")
41SET(OIS_LIB_DIR ${OIS_LIB_DIR} CACHE PATH "")
42
43IF (OIS_INCLUDE_DIR AND OIS_LIBRARIES)
44    SET(OIS_FOUND TRUE)
45ENDIF (OIS_INCLUDE_DIR AND OIS_LIBRARIES)
46
47IF (OIS_FOUND)
48    IF (NOT OIS_FIND_QUIETLY)
49        MESSAGE(STATUS "  libraries : ${OIS_LIBRARIES} from ${OIS_LIB_DIR}")
50        MESSAGE(STATUS "  includes  : ${OIS_INCLUDE_DIR}")
51    ENDIF (NOT OIS_FIND_QUIETLY)
52ELSE (OIS_FOUND)
53    IF (OIS_FIND_REQUIRED)
54        MESSAGE(FATAL_ERROR "Could not find OIS")
55    ENDIF (OIS_FIND_REQUIRED)
56ENDIF (OIS_FOUND)
Note: See TracBrowser for help on using the repository browser.