BASIS  r3148
FindMOSEK.cmake
Go to the documentation of this file.
00001 ##############################################################################
00002 # @file  FindMOSEK.cmake
00003 # @brief Find MOSEK (http://www.mosek.com) package.
00004 #
00005 # @par Input variables:
00006 # <table border="0">
00007 #   <tr>
00008 #     @tp @b MOSEK_DIR @endtp
00009 #     <td>The MOSEK package files are searched under the specified root
00010 #         directory. If they are not found there, the default search paths
00011 #         are considered. This variable can also be set as environment variable.</td>
00012 #   </tr>
00013 #   <tr>
00014 #     @tp @b MOSEK_NO_OMP @endtp
00015 #     <td>Whether to use the link libraries build without OpenMP, i.e.,
00016 #         multi-threading, enabled. By default, the multi-threaded libraries
00017 #         are used.</td>
00018 #   </tr>
00019 #   <tr>
00020 #     @tp @b MOSEK_FIND_COMPONENTS @endtp
00021 #     <td>The @c COMPONENTS argument(s) of the find_package() command can
00022 #         be used to also look for optional MOSEK components.
00023 #         Valid component values are "mex", "jar", and "pypkg".</td>
00024 #   </tr>
00025 #   <tr>
00026 #     @tp @b MOSEK_TOOLS_SUFFIX @endtp
00027 #     <td>Platform specific path suffix for tools, i.e., "tools/platform/linux64x86"
00028 #         on 64-bit Linux systems. If not specified, this module determines the
00029 #         right suffix depending on the CMake system variables.</td>
00030 #   </tr>
00031 #   <tr>
00032 #     @tp @b MATLAB_RELEASE @endtp
00033 #     <td>Release of MATLAB installation. Set to the 'Release' return value of
00034 #         the "ver ('MATLAB')" command of MATLAB without brackets. If this
00035 #         variable is not set and the basis_get_matlab_release() command is
00036 #         available, it is invoked to determine the release version automatically.
00037 #         Otherwise, an error is raised if the "mex" component is searched.</td>
00038 #   </tr>
00039 #   <tr>
00040 #     @tp @b MEX_EXT @endtp
00041 #     <td>The extension of MEX-files. If this variable is not set and the
00042 #         basis_mexext() command is available, it is invoked to determine the
00043 #         extension automatically. Otherwise, the MEX extension defaults to "mexa64".</td>
00044 #   </tr>
00045 #   <tr>
00046 #     @tp @b PYTHON_VERSION_MAJOR @endtp
00047 #     <td>Major version of Python installation as determined by FindPythonInterp.cmake module.</td>
00048 #   </tr>
00049 # </table>
00050 #
00051 # @par Output variables:
00052 # <table border="0">
00053 #   <tr>
00054 #     @tp @b MOSEK_FOUND @endtp
00055 #     <td>Whether the package was found and the following CMake variables are valid.</td>
00056 #   </tr>
00057 #   <tr>
00058 #     @tp @b MOSEK_<component>_FOUND @endtp
00059 #     <td>Whether the component requested by @c MOSEK_FIND_COMPONENTS was found.</td>
00060 #   </tr>
00061 #   <tr>
00062 #     @tp @b MOSEK_INCLUDE_DIR @endtp
00063 #     <td>Package include directories.</td>
00064 #   </tr>
00065 #   <tr>
00066 #     @tp @b MOSEK_INCLUDES @endtp
00067 #     <td>Include directories including prerequisite libraries (non-cached).</td>
00068 #   </tr>
00069 #   <tr>
00070 #     @tp @b MOSEK_LIBRARY @endtp
00071 #     <td>Package libraries.</td>
00072 #   </tr>
00073 #   <tr>
00074 #     @tp @b MOSEK_LIBRARIES @endtp
00075 #     <td>Package libraries and prerequisite libraries (non-cached).</td>
00076 #   </tr>
00077 #   <tr>
00078 #     @tp @b MOSEK_mosekopt_MEX @endtp
00079 #     <td>Package mosekopt MEX-file.</td>
00080 #   </tr>
00081 #   <tr>
00082 #     @tp @b MOSEK_MEX_FILES @endtp
00083 #     <td>List of MEX-files (non-cached).</td>
00084 #   </tr>
00085 #   <tr>
00086 #     @tp @b MOSEK_mosek_JAR @endtp
00087 #     <td>Package mosek Java library (.jar file).</td>
00088 #   </tr>
00089 #   <tr>
00090 #     @tp @b MOSEK_CLASSPATH @endtp
00091 #     <td>List of Java package libraries and prerequisite libraries (non-cached).</td>
00092 #   </tr>
00093 #   <tr>
00094 #     @tp @b MOSEK_PYTHONPATH @endtp
00095 #     <td>Path to Python modules of this package.</td>
00096 #   </tr>
00097 # </table>
00098 #
00099 # Copyright (c) 2011, 2012 University of Pennsylvania. All rights reserved.<br />
00100 # See https://www.cbica.upenn.edu/sbia/software/license.html or COPYING file.
00101 #
00102 # Contact: SBIA Group <sbia-software at uphs.upenn.edu>
00103 #
00104 # @ingroup CMakeFindModules
00105 ##############################################################################
00106 
00107 # ----------------------------------------------------------------------------
00108 # optional components to look for
00109 set (_MOSEK_OPTIONAL_COMPONENTS mex jar pypkg)
00110 foreach (CMP IN LISTS _MOSEK_OPTIONAL_COMPONENTS)
00111   set (MOSEK_FIND_${CMP} FALSE)
00112 endforeach ()
00113 foreach (CMP IN LISTS MOSEK_FIND_COMPONENTS)
00114   if (NOT CMP MATCHES "^(mex|jar|pypkg)$")
00115     message (FATAL_ERROR "Invalid MOSEK component: ${CMP}")
00116   endif ()
00117   set (MOSEK_FIND_${CMP} TRUE)
00118 endforeach ()
00119 
00120 # ----------------------------------------------------------------------------
00121 # remember CMAKE_FIND_LIBRARY_SUFFIXES to be able to restore it
00122 set (_MOSEK_CMAKE_FIND_LIBRARY_SUFFIXES "${CMAKE_FIND_LIBRARY_SUFFIXES}")
00123 
00124 # ----------------------------------------------------------------------------
00125 # versions - library suffixes
00126 
00127 # known MOSEK versions, all entries have to be specified in descending order!
00128 set (_MOSEK_VERSIONS_MAJOR 6)
00129 set (_MOSEK6_VERSIONS      6.0)
00130 
00131 # get a full list of particular versions (<major>.<minor>) to look for
00132 set (_MOSEK_FIND_VERSIONS)
00133 if (MOSEK_FIND_VERSION)
00134   if (MOSEK_FIND_VERSION MATCHES "^([0-9]+\\.[0-9]+)(\\.[0-9]+.*)?$")
00135     set (_MOSEK_FIND_VERSION_MAJOR_MINOR "${CMAKE_MATCH_1}")
00136     list (APPEND _MOSEK_FIND_VERSIONS ${_MOSEK_FIND_VERSION_MAJOR_MINOR})
00137     if (NOT MOSEK_FIND_VERSION_EXACT)
00138       string (REGEX REPLACE "^([0-9]+).*" "\\1" _MOSEK_FIND_VERSION_MAJOR "${CMAKE_MATCH_1}")
00139       foreach (_MOSEK_VERSION IN LISTS _MOSEK${_MOSEK_FIND_VERSION_MAJOR}_VERSIONS)
00140         if (NOT _MOSEK_VERSION VERSION_LESS _MOSEK_FIND_VERSION_MAJOR_MINOR)
00141           list (APPEND _MOSEK_FIND_VERSIONS ${_MOSEK_VERSION})
00142         endif()
00143       endforeach()
00144       unset (_MOSEK_FIND_VERSION_MAJOR)
00145     endif ()
00146     unset (_MOSEK_FIND_VERSION_MAJOR_MINOR)
00147   else ()
00148     if (APPLE)
00149       list (APPEND _MOSEK_LIBRARY_SUFFIXES .dylib.${_MOSEK_FIND_VERSION_MAJOR_MINOR})
00150     elseif (UNIX)
00151       list (APPEND _MOSEK_LIBRARY_SUFFIXES .so.${_MOSEK_FIND_VERSION_MAJOR_MINOR})
00152     endif ()
00153     set (_MOSEK_FIND_OTHER_VERSIONS ${_MOSEK${MOSEK_FIND_VERSION}_VERSIONS})
00154   endif ()
00155 else ()
00156   foreach (_MOSEK_VERSION_MAJOR IN LISTS _MOSEK_VERSIONS_MAJOR)
00157     list (APPEND _MOSEK_FIND_VERSIONS ${_MOSEK${_MOSEK_VERSION_MAJOR}_VERSIONS})
00158   endforeach ()
00159 endif ()
00160 
00161 # ----------------------------------------------------------------------------
00162 # initialize search
00163 if (NOT MOSEK_DIR)
00164   set (MOSEK_DIR "$ENV{MOSEK_DIR}" CACHE PATH "Installation prefix for MOSEK." FORCE)
00165 endif ()
00166 
00167 # MATLAB components
00168 if (MOSEK_FIND_mex)
00169   # MATLAB version
00170   if (NOT MATLAB_RELEASE)
00171     if (COMMAND basis_get_matlab_release)
00172       basis_get_matlab_release (MATLAB_RELEASE)
00173       if (NOT MATLAB_RELEASE)
00174         message (FATAL_ERROR "Failed to determine release version of MATLAB installation."
00175                              " This information is required to be able to find the right MOSEK MEX-files."
00176                              " Alternatively, set MATLAB_RELEASE manually and try again.")
00177       endif ()
00178     else ()
00179       message (FATAL_ERROR "MATLAB_RELEASE variable not set."
00180                            " This information is required to be able to find the right MOSEK MEX-files."
00181                            " Set MATLAB_RELEASE to the correct MATLAB release version, e.g., R2009b,"
00182                            " and try again.")
00183     endif ()
00184   endif ()
00185   string (TOLOWER "${MATLAB_RELEASE}" MATLAB_RELEASE_L)
00186   # search path for MOSEK MATLAB toolbox
00187   if (NOT MOSEK_TOOLBOX_SUFFIX)
00188     if (MOSEK_DIR)
00189       file (
00190         GLOB_RECURSE
00191           MOSEK_TOOLBOX_SUFFIXES
00192         RELATIVE "${MOSEK_DIR}"
00193         "${MOSEK_DIR}/toolbox/*/*.mex*"
00194       )
00195       set (MOSEK_TOOLBOX_VERSIONS)
00196       foreach (MOSEK_MEX_FILE IN LISTS MOSEK_TOOLBOX_SUFFIXES)
00197         get_filename_component (MOSEK_TOOLBOX_SUFFIX  "${MOSEK_MEX_FILE}" PATH)
00198         get_filename_component (MOSEK_TOOLBOX_VERSION "${MOSEK_TOOLBOX_SUFFIX}" NAME)
00199         list (APPEND MOSEK_TOOLBOX_VERSIONS "${MOSEK_TOOLBOX_VERSION}")
00200         set (MOSEK_TOOLBOX_SUFFIX)
00201       endforeach ()
00202       list (SORT MOSEK_TOOLBOX_VERSIONS)
00203       list (REVERSE MOSEK_TOOLBOX_VERSIONS)
00204       string (REGEX MATCH "[0-9][0-9]*" MATLAB_RELEASE_YEAR "${MATLAB_RELEASE}")
00205       foreach (MOSEK_TOOLBOX_VERSION IN LISTS MOSEK_TOOLBOX_VERSIONS)
00206         if (MOSEK_TOOLBOX_VERSION MATCHES "[rR]([0-9][0-9]*)[ab]")
00207           if (CMAKE_MATCH_1 EQUAL MATLAB_RELEASE_VERSION OR
00208               CMAKE_MATCH_1 LESS  MATLAB_RELEASE_VERSION)
00209             set (MATLAB_TOOLBOX_SUFFIX "toolbox/${MOSEK_TOOLBOX_VERSION}")
00210             break ()
00211           endif ()
00212         endif ()
00213       endforeach ()
00214     endif ()
00215     if (NOT MOSEK_TOOLBOX_SUFFIX)
00216       set (MOSEK_TOOLBOX_SUFFIX "toolbox/${MATLAB_RELEASE_L}")
00217     endif ()
00218   endif ()
00219   # extension of MEX-files
00220   if (NOT MEX_EXT)
00221     if (COMMAND basis_mexext)
00222       basis_mexext ()
00223     else ()
00224       set (MEX_EXT "mexa64")
00225     endif ()
00226   endif ()
00227 endif ()
00228 
00229 # Python components
00230 if (MOSEK_FIND_pypkg)
00231   if (NOT PYTHON_VERSION_MAJOR)
00232     message (FATAL_ERROR "Python interpreter not found or not added as dependency before MOSEK. "
00233                          "The information about the Python version is required to be able to find "
00234                          "the right MOSEK Python modules. Therefore, add the PythonInterp package "
00235                          "as dependency to BasisProjects.cmake before the entry of MOSEK. "
00236                          "The FindPythonInterp.cmake module will determine the version of the "
00237                          "Python installation. Alternatively, set PYTHON_VERSION_MAJOR manually.")
00238   endif ()
00239 endif ()
00240 
00241 # library name
00242 set (MOSEK_LIBRARY_NAME "mosek")
00243 if (MOSEK_NO_OMP)
00244   set (MOSEK_LIBRARY_NAME "${MOSEK_LIBRARY_NAME}noomp")
00245 endif ()
00246 if (UNIX)
00247   if (NOT CMAKE_SIZE_OF_VOID_P EQUAL 4)
00248     set (MOSEK_LIBRARY_NAME "${MOSEK_LIBRARY_NAME}64")
00249   endif ()
00250 endif ()
00251 
00252 # append/set library version suffixes
00253 if (WIN32)
00254   if (_MOSEK_FIND_VERSIONS)
00255     foreach (_MOSEK_VERSION IN LISTS _MOSEK_FIND_VERSIONS)
00256       string (REPLACE "." "_" _MOSEK_VERSION "${_MOSEK_VERSION}")
00257       list (APPEND MOSEK_LIBRARY_NAMES "${MOSEK_LIBRARY_NAME}${_MOSEK_VERSION}")
00258     endforeach ()
00259   else ()
00260     set (MOSEK_LIBRARY_NAMES "${MOSEK_LIBRARY_NAME}")
00261   endif ()
00262 else ()
00263   set (MOSEK_LIBRARY_NAMES "${MOSEK_LIBRARY_NAME}")
00264   if (_MOSEK_FIND_VERSIONS)
00265     set (CMAKE_FIND_LIBRARY_SUFFIXES)
00266     foreach (_MOSEK_VERSION IN LISTS _MOSEK_FIND_VERSIONS)
00267       if (APPLE)
00268         list (APPEND CMAKE_FIND_LIBRARY_SUFFIXES .${_MOSEK_VERSION}.dylib)
00269       else ()
00270         list (APPEND CMAKE_FIND_LIBRARY_SUFFIXES .so.${_MOSEK_VERSION})
00271       endif ()
00272     endforeach ()
00273     if (NOT MOSEK_FIND_VERSION)
00274       if (APPLE)
00275         list (APPEND CMAKE_FIND_LIBRARY_SUFFIXES .dylib)
00276       else ()
00277         list (APPEND CMAKE_FIND_LIBRARY_SUFFIXES .so)
00278       endif ()
00279     endif ()
00280   endif ()
00281 endif ()
00282 
00283 # search path for MOSEK tools
00284 if (NOT MOSEK_TOOLS_SUFFIX)
00285   set (MOSEK_TOOLS_SUFFIX "tools/platform/")
00286   if (WIN32)
00287     set (MOSEK_TOOLS_SUFFIX "${MOSEK_TOOLS_SUFFIX}win")
00288   elseif (APPLE)
00289     set (MOSEK_TOOLS_SUFFIX "${MOSEK_TOOLS_SUFFIX}osx")
00290   else ()
00291     set (MOSEK_TOOLS_SUFFIX "${MOSEK_TOOLS_SUFFIX}linux")
00292   endif ()
00293   if (CMAKE_SIZE_OF_VOID_P EQUAL 4)
00294     set (MOSEK_TOOLS_SUFFIX "${MOSEK_TOOLS_SUFFIX}32")
00295   else ()
00296     set (MOSEK_TOOLS_SUFFIX "${MOSEK_TOOLS_SUFFIX}64")
00297   endif ()
00298   set (MOSEK_TOOLS_SUFFIX "${MOSEK_TOOLS_SUFFIX}x86")
00299 endif ()
00300 
00301 unset (_MOSEK_FIND_VERSIONS)
00302 
00303 #-------------------------------------------------------------
00304 # find include files and library
00305 foreach (_MOSEK_I IN ITEMS 1 2) # try twice in case MOSEK_DIR
00306                                 # was not set, but known in
00307                                 # second iteration
00308 
00309   # find files
00310   if (MOSEK_DIR)
00311 
00312     find_path (
00313       MOSEK_INCLUDE_DIR
00314         NAMES         mosek.h
00315         HINTS         "${MOSEK_DIR}"
00316         PATH_SUFFIXES "${MOSEK_TOOLS_SUFFIX}/h"
00317         DOC           "Include directory for MOSEK libraries."
00318         NO_DEFAULT_PATH
00319     )
00320 
00321     find_library (
00322       MOSEK_LIBRARY
00323         NAMES         ${MOSEK_LIBRARY_NAMES}
00324         HINTS         "${MOSEK_DIR}"
00325         PATH_SUFFIXES "${MOSEK_TOOLS_SUFFIX}/bin"
00326         DOC           "MOSEK link library."
00327         NO_DEFAULT_PATH
00328     )
00329 
00330   else ()
00331 
00332     find_path (
00333       MOSEK_INCLUDE_DIR
00334         NAMES mosek.h
00335         HINTS ENV C_INCLUDE_PATH ENV CXX_INCLUDE_PATH
00336         DOC   "Include directory for MOSEK libraries."
00337     )
00338 
00339     find_library (
00340       MOSEK_LIBRARY
00341         NAMES ${MOSEK_LIBRARY_NAMES}
00342         HINTS ENV LD_LIBRARY_PATH
00343         DOC   "MOSEK link library."
00344     )
00345 
00346   endif ()
00347 
00348   # derive MOSEK_DIR
00349   if (NOT MOSEK_DIR)
00350     if (COMMAND basis_sanitize_for_regex)
00351       basis_sanitize_for_regex (_MOSEK_TOOLS_SUFFIX_RE "${MOSEK_TOOLS_SUFFIX}")
00352     else ()
00353       set (_MOSEK_TOOLS_SUFFIX_RE "${MOSEK_TOOLS_SUFFIX}")
00354     endif ()
00355     if (MOSEK_INCLUDE_DIR)
00356       string (REGEX REPLACE "${_MOSEK_TOOLS_SUFFIX_RE}/.*$" "" _MOSEK_DIR "${MOSEK_INCLUDE_DIR}")
00357       set (MOSEK_DIR "${_MOSEK_DIR}" CACHE PATH "Installation prefix for MOSEK." FORCE)
00358     elseif (MOSEK_LIBRARY)
00359       string (REGEX REPLACE "${_MOSEK_TOOLS_SUFFIX_RE}/.*$" "" _MOSEK_DIR "${MOSEK_LIBRARY}")
00360       set (MOSEK_DIR "${_MOSEK_DIR}" CACHE PATH "Installation prefix for MOSEK." FORCE)
00361     endif ()
00362     unset (_MOSEK_TOOLS_SUFFIX_RE)
00363     unset (_MOSEK_DIR)
00364   endif ()
00365 
00366   # skip second iteration if both found already
00367   if (MOSEL_INCLUDE_DIR AND MOSEK_LIBRARY)
00368     break ()
00369   endif ()
00370 endforeach ()
00371 
00372 mark_as_advanced (MOSEK_INCLUDE_DIR)
00373 mark_as_advanced (MOSEK_LIBRARY)
00374 
00375 # MATLAB components
00376 if (MOSEK_FIND_mex)
00377   if (MOSEK_DIR)
00378 
00379     find_file (
00380       MOSEK_mosekopt_MEX
00381         NAMES         mosekopt.${MEX_EXT}
00382         HINTS         "${MOSEK_DIR}"
00383         PATH_SUFFIXES "${MOSEK_TOOLBOX_SUFFIX}"
00384         DOC           "The mosekopt MEX-file of the MOSEK package."
00385         NO_DEFAULT_PATH
00386     )
00387 
00388   else ()
00389 
00390     find_file (
00391       MOSEK_mosekopt_MEX
00392         NAMES         mosekopt.${MEX_EXT}
00393         PATH_SUFFIXES "${MOSEK_TOOLBOX_SUFFIX}"
00394         DOC           "The mosekopt MEX-file of the MOSEK package."
00395     )
00396 
00397   endif ()
00398 
00399   if (MOSEK_mosekopt_MEX)
00400     set (MOSEK_MEX_FILES "${MOSEK_mosekopt_MEX}")
00401   endif ()
00402 
00403   mark_as_advanced (MOSEK_mosekopt_MEX)
00404 endif ()
00405 
00406 # Java components
00407 if (MOSEK_FIND_jar)
00408   if (MOSEK_DIR)
00409 
00410     find_file (
00411       MOSEK_mosek_JAR
00412         NAMES         mosek.jar
00413         HINTS         "${MOSEK_DIR}"
00414         PATH_SUFFIXES "${MOSEK_TOOLS_SUFFIX}/bin"
00415         DOC           "The Java library (.jar file) of the MOSEK package."
00416         NO_DEFAULT_PATH
00417     )
00418 
00419   else ()
00420 
00421     find_file (
00422       MOSEK_mosek_JAR
00423         NAMES mosek.jar
00424         HINTS ENV CLASSPATH
00425         DOC   "The Java library (.jar file) of the MOSEK package."
00426     )
00427 
00428   endif ()
00429 
00430   if (MOSEK_mosek_JAR)
00431     set (MOSEK_CLASSPATH "${MOSEK_mosek_JAR}")
00432   endif ()
00433 
00434   mark_as_advanced (MOSEK_mosek_JAR)
00435 endif ()
00436 
00437 # Python components
00438 if (MOSEK_FIND_pypkg)
00439   if (MOSEK_DIR)
00440 
00441     find_path (
00442       MOSEK_PYTHONPATH
00443         NAMES "mosek/array.py"
00444         HINTS ENV PYTHONPATH
00445         DOC   "Path to MOSEK Python module."
00446     )
00447 
00448   else ()
00449 
00450     find_path (
00451       MOSEK_PYTHONPATH
00452         NAMES "mosek/array.py"
00453         HINTS "${MOSEK_DIR}/${MOSEK_PATH_SUFFIX}/python/${PYTHON_VERSION_MAJOR}"
00454         DOC   "Path to MOSEK Python module."
00455         NO_DEFAULT_PATH
00456     )
00457 
00458   endif ()
00459 
00460   mark_as_advanced (MOSEK_PYTHONPATH)
00461 endif ()
00462 
00463 # ----------------------------------------------------------------------------
00464 # prerequisite libraries
00465 set (MOSEK_INCLUDES  "${MOSEK_INCLUDE_DIR}")
00466 set (MOSEK_LIBRARIES "${MOSEK_LIBRARY}")
00467 
00468 # ----------------------------------------------------------------------------
00469 # aliases / backwards compatibility
00470 set (MOSEK_INCLUDE_DIRS "${MOSEK_INCLUDES}")
00471 
00472 # ----------------------------------------------------------------------------
00473 # debugging
00474 if (BASIS_DEBUG AND COMMAND basis_dump_variables)
00475   basis_dump_variables ("${CMAKE_CURRENT_BINARY_DIR}/FindMOSEKVariables.cmake")
00476 endif ()
00477 
00478 # ----------------------------------------------------------------------------
00479 # handle the QUIETLY and REQUIRED arguments and set *_FOUND to TRUE
00480 # if all listed variables are found or TRUE
00481 include (FindPackageHandleStandardArgs)
00482 
00483 set (MOSEK_REQUIRED_VARS
00484   MOSEK_DIR
00485   MOSEK_INCLUDE_DIR
00486   MOSEK_LIBRARY
00487 )
00488 
00489 if (MOSEK_FIND_mex)
00490   list (APPEND MOSEK_REQUIRED_VARS MOSEK_mosekopt_MEX)
00491   if (MOSEK_mosekopt_MEX)
00492     set (MOSEK_mex_FOUND TRUE)
00493   else ()
00494     set (MOSEK_mex_FOUND FALSE)
00495   endif ()
00496 endif ()
00497 if (MOSEK_FIND_jar)
00498   list (APPEND MOSEK_REQUIRED_VARS MOSEK_mosek_JAR)
00499   if (MOSEK_mosek_JAR)
00500     set (MOSEK_jar_FOUND TRUE)
00501   else ()
00502     set (MOSEK_jar_FOUND FALSE)
00503   endif ()
00504 endif ()
00505 if (MOSEK_FIND_pypkg)
00506   list (APPEND MOSEK_REQUIRED_VARS MOSEK_PYTHONPATH)
00507   if (MOSEK_PYTHONPATH)
00508     set (MOSEK_pypkg_FOUND TRUE)
00509   else ()
00510     set (MOSEK_pypkg_FOUND FALSE)
00511   endif ()
00512 endif ()
00513 
00514 find_package_handle_standard_args (
00515   MOSEK
00516 # MESSAGE
00517     DEFAULT_MSG
00518 # VARIABLES
00519     ${MOSEK_REQUIRED_VARS}
00520 )
00521 
00522 set (CMAKE_FIND_LIBRARY_SUFFIXES "${_MOSEK_CMAKE_FIND_LIBRARY_SUFFIXES}")
00523 unset (_MOSEK_CMAKE_FIND_LIBRARY_SUFFIXES)
00524 
00525 foreach (CMP IN LISTS _MOSEK_OPTIONAL_COMPONENTS)
00526   unset (MOSEK_FIND_${CMP})
00527 endforeach ()