FindADOLC.cmake 2.15 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 25 26 27 28 29 30 31 32 33
# - Try to find ADOLC
# Once done this will define
#  ADOLC_FOUND         - System has ADOLC
#  ADOLC_INCLUDE_DIRS  - The ADOLC include directories
#  ADOLC_LIBRARIES     - The libraries needed to use ADOLC

if (ADOLC_INCLUDE_DIR)
  # in cache already
  set(ADOLC_FOUND TRUE)
  set(ADOLC_INCLUDE_DIRS "${ADOLC_INCLUDE_DIR}" )
  set(ADOLC_LIBRARIES "${ADOLC_LIBRARY}" )
else (ADOLC_INCLUDE_DIR)

message( status "adolc include dir: ${ADOLC_DIR}/include/")

find_path( ADOLC_INCLUDE_DIR 
	   NAMES adolc/adolc.h 
           PATHS $ENV{ADOLC_DIR}/include/
                 /usr/include/adolc
                 /usr/local/include
                 /usr/local/include/adolc/
                 /opt/local/include/adolc/
                 "c:\\libs\\adolc\\include"
	         "c:\\libs\\adolc\\include"
	         ${PROJECT_SOURCE_DIR}/MacOS/Libs/adolc/include
                 ../../External/include
                 ${module_file_path}/../../../External/include
          )
          
find_library( ADOLC_LIBRARY 
              adolc
              PATHS $ENV{ADOLC_DIR}/lib
                    $ENV{ADOLC_DIR}/lib64
Mike Kremer's avatar
Mike Kremer committed
34 35 36 37 38 39
                   /usr/lib/adolc
                   /usr/local/lib
                   /usr/local/lib/adolc/
                   /opt/local/lib/adolc/
                   "c:\\libs\\adolc\\lib"
                   "c:\\libs\\adolc\\lib"
40 41
                   ${PROJECT_SOURCE_DIR}/MacOS/Libs/adolc/lib
                   /usr/lib64/adolc
Mike Kremer's avatar
Mike Kremer committed
42 43 44 45 46
                   /usr/local/lib64
                   /usr/local/lib64/adolc/
                   /opt/local/lib64/adolc/
                   "c:\\libs\\adolc\\lib64"
                   "c:\\libs\\adolc\\lib64"
47 48 49 50 51 52 53
                   ${PROJECT_SOURCE_DIR}/MacOS/Libs/adolc/lib64
                   DOC "ADOL-C library"
              )

set(ADOLC_INCLUDE_DIRS "${ADOLC_INCLUDE_DIR}" )
set(ADOLC_LIBRARIES "${ADOLC_LIBRARY}" )

Mike Kremer's avatar
Mike Kremer committed
54

55 56 57 58 59
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set LIBCPLEX_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(ADOLC  DEFAULT_MSG
                                  ADOLC_LIBRARY ADOLC_INCLUDE_DIR)
Mike Kremer's avatar
Mike Kremer committed
60

61
mark_as_advanced(ADOLC_INCLUDE_DIR ADOLC_LIBRARY)
Mike Kremer's avatar
Mike Kremer committed
62

63
endif(ADOLC_INCLUDE_DIR)