cmake/FindGLPK.cmake
changeset 496 17d918051964
child 666 ec817dfc2cb7
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/cmake/FindGLPK.cmake	Tue Jan 20 12:23:14 2009 +0000
     1.3 @@ -0,0 +1,20 @@
     1.4 +SET(GLPK_REGKEY "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Glpk;InstallPath]")
     1.5 +GET_FILENAME_COMPONENT(GLPK_ROOT_PATH ${GLPK_REGKEY} ABSOLUTE)
     1.6 +
     1.7 +FIND_PATH(GLPK_INCLUDE_DIR
     1.8 +  glpk.h
     1.9 +  PATHS ${GLPK_REGKEY}/include)
    1.10 +
    1.11 +FIND_LIBRARY(GLPK_LIBRARY
    1.12 +  NAMES glpk
    1.13 +  PATHS ${GLPK_REGKEY}/lib)
    1.14 +
    1.15 +INCLUDE(FindPackageHandleStandardArgs)
    1.16 +FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLPK DEFAULT_MSG GLPK_LIBRARY GLPK_INCLUDE_DIR)
    1.17 +
    1.18 +IF(GLPK_FOUND)
    1.19 +  SET(GLPK_LIBRARIES ${GLPK_LIBRARY})
    1.20 +  SET(GLPK_BIN_DIR ${GLPK_ROOT_PATH}/bin)
    1.21 +ENDIF(GLPK_FOUND)
    1.22 +
    1.23 +MARK_AS_ADVANCED(GLPK_LIBRARY GLPK_INCLUDE_DIR GLPK_BIN_DIR)