FindGMM.cmake 1.58 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 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
# - Try to find GMM
# Once done this will define
#  GMM_FOUND          - System has GMM
#  GMM_INCLUDE_DIRS   - The GMM include directories
#  GMM_COMPILER_FLAGS - Compiler flags that are necessary for GMM

if (GMM_INCLUDE_DIR)
  # in cache already
  set(GMM_FOUND TRUE)
  set(GMM_INCLUDE_DIRS "${GMM_INCLUDE_DIR}" )
else (GMM_INCLUDE_DIR)

find_path( GMM_INCLUDE_DIR 
           NAMES gmm/gmm.h 
           PATHS $ENV{GMM_DIR}
                 /usr/include
                 /usr/include
                 /usr/local/include
                 ~/sw/gmm-4.1/include
		 "c:\\libs\\gmm-4.1\\include"
                 "c:\\libs\\gmm-3.0\\include"
		 ${PROJECT_SOURCE_DIR}/MacOS/Libs/gmm-3.1/include
                 ../../External/include
                 /ACG/acgdev/gcc-4.3-i686/gmm-4.1/include/
                 /ACG/acgdev/gcc-4.3-i686/gmm-3/include/
                 ${module_file_path}/../../../External/include
                 $ENV{HOME}/opt/gmm/gmm-4.2/include
          )

set(GMM_INCLUDE_DIRS "${GMM_INCLUDE_DIR}" )


# use c++ headers as default
IF (WIN32)
  set(GMM_COMPILER_FLAGS "-D_SCL_SECURE_NO_DEPRECATE" CACHE STRING "GMM Compiler Flags")
#  add_definitions(-D_SCL_SECURE_NO_DEPRECATE)
ELSE(WIN32)
  set(GMM_COMPILER_FLAGS "" CACHE STRING "GMM Compiler Flags")
ENDIF(WIN32)

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(GMM  DEFAULT_MSG
                                  GMM_INCLUDE_DIR)

mark_as_advanced(GMM_INCLUDE_DIR GMM_COMPILER_FLAGS)

endif(GMM_INCLUDE_DIR)
50