FindIsoEx.cmake 1.02 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
# - 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)

# search all lib directories in packages for OpenFlipper
file (
  GLOB _libdirs
           "${CMAKE_SOURCE_DIR}/libs"
           "${CMAKE_SOURCE_DIR}/Package-*/libs"
)



FIND_PATH( ISOEX_INCLUDE_DIRS IsoEx/Extractors/MarchingCubesT.hh
David Bommes's avatar
David Bommes committed
25 26
           PATHS ${_libdirs}
                 ${CMAKE_SOURCE_DIR}/libs )
27 28 29 30 31 32 33 34 35 36 37 38 39

add_definitions (-DISOEXDLL -DUSEISOEX )

IF (ISOEX_INCLUDE_DIRS)
  SET(ISOEX_FOUND TRUE)
  SET( ISOEX_LIBRARY_DIR "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}" )
  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)