~ubuntu-branches/ubuntu/maverick/freecad/maverick

« back to all changes in this revision

Viewing changes to cmake/FindOpenCasCade.cmake

  • Committer: Bazaar Package Importer
  • Author(s): Teemu Ikonen
  • Date: 2009-07-16 18:37:41 UTC
  • Revision ID: james.westby@ubuntu.com-20090716183741-oww9kcxqrk991i1n
Tags: upstream-0.8.2237
ImportĀ upstreamĀ versionĀ 0.8.2237

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Try to find OCC
 
2
# Once done this will define
 
3
#
 
4
# OCC_FOUND        - system has OCC - Open Inventor
 
5
# OCC_INCLUDE_DIR  - where the Inventor include directory can be found
 
6
# OCC_LIBRARY      - Link this to use OCC
 
7
#
 
8
 
 
9
 
 
10
IF (WIN32)
 
11
  IF (CYGWIN)
 
12
 
 
13
    FIND_PATH(OCC_INCLUDE_DIR Inventor/So.h
 
14
      /usr/include
 
15
      /usr/local/include
 
16
    )
 
17
 
 
18
    FIND_LIBRARY(OCC_LIBRARY Coin
 
19
      /usr/lib
 
20
      /usr/local/lib
 
21
    )
 
22
 
 
23
  ELSE (CYGWIN)
 
24
 
 
25
    FIND_PATH(OCC_INCLUDE_DIR Inventor/So.h
 
26
      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\OCC\\2;Installation Path]/include"
 
27
    )
 
28
 
 
29
    FIND_LIBRARY(OCC_LIBRARY_DEBUG coin2d
 
30
      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\OCC\\2;Installation Path]/lib"
 
31
    )
 
32
 
 
33
    FIND_LIBRARY(OCC_LIBRARY_RELEASE coin2
 
34
      "[HKEY_LOCAL_MACHINE\\SOFTWARE\\SIM\\OCC\\2;Installation Path]/lib"
 
35
    )
 
36
 
 
37
    IF (OCC_LIBRARY_DEBUG AND OCC_LIBRARY_RELEASE)
 
38
      SET(OCC_LIBRARY optimized ${OCC_LIBRARY_RELEASE}
 
39
                         debug ${OCC_LIBRARY_DEBUG})
 
40
    ELSE (OCC_LIBRARY_DEBUG AND OCC_LIBRARY_RELEASE)
 
41
      IF (OCC_LIBRARY_DEBUG)
 
42
        SET (OCC_LIBRARY ${OCC_LIBRARY_DEBUG})
 
43
      ENDIF (OCC_LIBRARY_DEBUG)
 
44
      IF (OCC_LIBRARY_RELEASE)
 
45
        SET (OCC_LIBRARY ${OCC_LIBRARY_RELEASE})
 
46
      ENDIF (OCC_LIBRARY_RELEASE)
 
47
    ENDIF (OCC_LIBRARY_DEBUG AND OCC_LIBRARY_RELEASE)
 
48
 
 
49
    IF (OCC_LIBRARY)
 
50
      ADD_DEFINITIONS ( -DCOIN_NOT_DLL )
 
51
    #ELSE (OCC_LIBRARY)
 
52
    #  SET (OCC_LIBRARY coin2d CACHE STRING "OCC Library (Debug) - Open Inventor API")
 
53
    ENDIF (OCC_LIBRARY)
 
54
 
 
55
  ENDIF (CYGWIN)
 
56
 
 
57
ELSE (WIN32)
 
58
  IF(APPLE)
 
59
    FIND_PATH(OCC_INCLUDE_DIR Inventor/So.h
 
60
     /Library/Frameworks/Inventor.framework/Headers 
 
61
     /usr/local/include
 
62
     /usr/include
 
63
    )
 
64
    FIND_LIBRARY(OCC_LIBRARY Coin
 
65
      /Library/Frameworks/Inventor.framework/Libraries
 
66
      /usr/lib
 
67
      /usr/local/lib
 
68
    )   
 
69
    SET(OCC_LIBRARY "-framework OCC" CACHE STRING "OCC library for OSX")
 
70
   ELSE(APPLE)
 
71
 
 
72
  FIND_PATH(OCC_INCLUDE_DIR Standard_Version.hxx
 
73
    /usr/include/opencascade
 
74
    /usr/local/include/opencascade
 
75
  )
 
76
 
 
77
  FIND_LIBRARY(OCC_LIBRARY TKernel
 
78
    /usr/lib
 
79
    /usr/local/lib
 
80
  )   
 
81
  ENDIF(APPLE)
 
82
 
 
83
ENDIF (WIN32)
 
84
 
 
85
 
 
86
SET( OCC_FOUND "NO" )
 
87
IF(OCC_LIBRARY)
 
88
  SET( OCC_FOUND "YES" )
 
89
ENDIF(OCC_LIBRARY)
 
90