FindIsoEx.cmake 850 Bytes
Newer Older
Jan Möbius's avatar
Jan Möbius committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# - Try to find ISOEX
# Once done this will define
#  
#  ISOEX_FOUND        - system has ISOEX
#  ISOEX_INCLUDE_DIR  - the ISOEX include directory
#  ISOEX_LIBRARY_DIR  - where the libraries are
#  ISOEX_LIBRARY      - Link these to use ISOEX
#   

IF (ISOEX_INCLUDE_DIRS)
  # Already in cache, be silent
  SET(ISOEX_FIND_QUIETLY TRUE)
ENDIF (ISOEX_INCLUDE_DIRS)

FIND_PATH( ISOEX_INCLUDE_DIRS IsoEx/Extractors/MarchingCubesT.hh
           PATHS "${CMAKE_SOURCE_DIR}/libs" )

add_definitions (-DISOEXDLL -DUSEISOEX )

IF (ISOEX_INCLUDE_DIRS)
  SET(ISOEX_FOUND TRUE)
Jan Möbius's avatar
Jan Möbius committed
22
  SET( ISOEX_LIBRARY_DIR "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}" )
Jan Möbius's avatar
Jan Möbius committed
23
24
25
26
27
28
29
  SET( ISOEX_LIBRARY "IsoEx")
  list (APPEND ISOEX_INCLUDE_DIRS "${CMAKE_BINARY_DIR}/libs/IsoEx")
ELSE (ISOEX_INCLUDE_DIRS)
  SET( ISOEX_FOUND FALSE )
  SET( ISOEX_LIBRARY_DIR )
ENDIF (ISOEX_INCLUDE_DIRS)