source: tol/tolbase/cmake/modules/FindTOL.cmake

devel
Last change on this file was 4fce39e, checked in by Jorge Pérez <josp.jorge@…>, 12 years ago

refs #1818, #1812, compilación del ejecutable de tolbase basado en CMake

git-svn-id: ​https://www.tol-project.org/svn/tolp/trunk@6510 be4846ae-f051-483a-831f-b64e7d08527f

  • Property mode set to 100644
File size: 1.4 KB
RevLine 
[4fce39e]1# This module defines
2# TOL_FOUND.  If false, you cannot build anything that requires TOL.
3# TOL_INCLUDE_DIR where to find the tol's header files
4# TOL_LIBRARIES, the libraries to link against to use TOL
5# also defined, but not for general use is
6# TOL_LIBRARY, the path to tol library.
7#
8# You can provide in TOL_PREFIX_PATH the path to the prefix
9# instalation of TOL.
10#
11
12include( LibFindMacros )
13
14set( TOL_FOUND 0 )
15
16if( EXISTS ${TOL_PREFIX_PATH} )
17
18  #find includes
19  find_path(
20    TOL_INCLUDE_DIR
21    NAMES "tol/tol_bcommon.h"
22    PATHS ${TOL_PREFIX_PATH}
23    PATH_SUFFIXES "include"
24    NO_DEFAULT_PATH )
25  find_library( TOL_LIBRARY
26    NAMES tol
27    PATHS ${TOL_PREFIX_PATH}
28    PATH_SUFFIXES "lib"
29    NO_DEFAULT_PATH )
30else(  EXISTS ${TOL_PREFIX_PATH} )
31
32  #find includes
33  find_path(
34    TOL_INCLUDE_DIR
35    NAMES "tol/tol_bcommon.h" )
36  find_library( TOL_LIBRARY
37    NAMES tol )
38endif( EXISTS ${TOL_PREFIX_PATH} )
39
40set( TOL_PROCESS_INCLUDES TOL_INCLUDE_DIR )
41set( TOL_PROCESS_LIBS TOL_LIBRARY )
42libfind_process( TOL )
43
44if( TOL_FOUND )
45  add_definitions(
46    -DHAVE_CONFIG_H -DUSE_DELAY_INIT -D__USE_ZIP_ARCHIVE__
47    -D__USE_DYNSCOPE__
48    -D__POOL_NONE__=0 -D__POOL_BFSMEM__=1 -D__USE_POOL__=__POOL_BFSMEM__
49    -D__HASH_MAP_MSVC__=1 -D__HASH_MAP_GOOGLE__=2 -D__HASH_MAP_GCC__=3
50    -D__HASH_MAP_ICC__=4 -D__USE_HASH_MAP__=__HASH_MAP_GOOGLE__ )
51  if( UNIX )
52    add_definitions( -DUNIX )
53  endif( )
54endif( TOL_FOUND )
55
Note: See TracBrowser for help on using the repository browser.