]>
Commit | Line | Data |
---|---|---|
1 | # Find module for DIM module | |
2 | # Setting: | |
3 | # - DIM_LIBRARIES | |
4 | # - DIM_INCLUDE_DIR | |
5 | ||
6 | set(DIM_FOUND FASLE) | |
7 | ||
8 | if(DIMDIR AND ODIR) | |
9 | # check for the existance of the DIM library | |
10 | find_library(DIM_LIBRARIES NAMES dim PATHS ${DIMDIR}/${ODIR} NO_DEFAULT_PATH DOC "Path to DIM library") | |
11 | ||
12 | if(NOT DIM_LIBRARIES) | |
13 | message(FATAL_ERROR "DIM library not found inside ${DIMDIR}/${ODIR}") | |
14 | else() | |
15 | message(STATUS "Found DIM library: ${DIM_LIBRARIES}") | |
16 | endif() | |
17 | ||
18 | # check for the existance of the DIM header | |
19 | find_path(DIM_INCLUDE_DIR NAMES dim.h PATHS ${DIMDIR}/dim NO_DEFAULT_PATH DOC "Path to DIM header folders.") | |
20 | ||
21 | if(NOT DIM_INCLUDE_DIR) | |
22 | message(FATAL_ERROR "DIM header not found inside ${DIM}/dim folder") | |
23 | else() | |
24 | message(STATUS "Found DIM header folder: ${DIM_INCLUDE_DIR}") | |
25 | endif() | |
26 | ||
27 | set(DIM_FOUND true) | |
28 | mark_as_advanced(DIM_LIBRARIES DIM_INCLUDE_DIR) | |
29 | endif() |