# ============================================================================
# Copyright (c) 2011-2012 University of Pennsylvania
# Copyright (c) 2013-2014 Andreas Schuh
# All rights reserved.
#
# See COPYING file for license information or visit
# http://opensource.andreasschuh.com/cmake-basis/download.html#license
# ============================================================================
##############################################################################
# @file FindMOSEK.cmake
# @brief Find MOSEK (http://www.mosek.com) package.
#
# @par Input variables:
#
#
# @tp @b MOSEK_DIR @endtp
# The MOSEK package files are searched under the specified root
# directory. If they are not found there, the default search paths
# are considered. This variable can also be set as environment variable. |
#
#
# @tp @b MOSEK_NO_OMP @endtp
# Whether to use the link libraries build without OpenMP, i.e.,
# multi-threading, enabled. By default, the multi-threaded libraries
# are used. |
#
#
# @tp @b MOSEK_FIND_COMPONENTS @endtp
# The @c COMPONENTS argument(s) of the find_package() command can
# be used to also look for optional MOSEK components.
# Valid component values are "mex", "jar", and "pypkg". |
#
#
# @tp @b MOSEK_TOOLS_SUFFIX @endtp
# Platform specific path suffix for tools, i.e., "tools/platform/linux64x86"
# on 64-bit Linux systems. If not specified, this module determines the
# right suffix depending on the CMake system variables. |
#
#
# @tp @b MATLAB_RELEASE @endtp
# Release of MATLAB installation. Set to the 'Release' return value of
# the "ver ('MATLAB')" command of MATLAB without brackets. If this
# variable is not set and the basis_get_matlab_release() command is
# available, it is invoked to determine the release version automatically.
# Otherwise, an error is raised if the "mex" component is searched. |
#
#
# @tp @b MEX_EXT @endtp
# The extension of MEX-files. If this variable is not set and the
# basis_mexext() command is available, it is invoked to determine the
# extension automatically. Otherwise, the MEX extension defaults to "mexa64". |
#
#
# @tp @b PYTHON_VERSION_MAJOR @endtp
# Major version of Python installation as determined by FindPythonInterp.cmake module. |
#
#
#
# @par Output variables:
#
#
# @tp @b MOSEK_FOUND @endtp
# Whether the package was found and the following CMake variables are valid. |
#
#
# @tp @b MOSEK__FOUND @endtp
# Whether the component requested by @c MOSEK_FIND_COMPONENTS was found. |
#
#
# @tp @b MOSEK_INCLUDE_DIR @endtp
# Package include directories. |
#
#
# @tp @b MOSEK_INCLUDES @endtp
# Include directories including prerequisite libraries (non-cached). |
#
#
# @tp @b MOSEK_LIBRARY @endtp
# Package libraries. |
#
#
# @tp @b MOSEK_LIBRARIES @endtp
# Package libraries and prerequisite libraries (non-cached). |
#
#
# @tp @b MOSEK_mosekopt_MEX @endtp
# Package mosekopt MEX-file. |
#
#
# @tp @b MOSEK_MEX_FILES @endtp
# List of MEX-files (non-cached). |
#
#
# @tp @b MOSEK_mosek_JAR @endtp
# Package mosek Java library (.jar file). |
#
#
# @tp @b MOSEK_CLASSPATH @endtp
# List of Java package libraries and prerequisite libraries (non-cached). |
#
#
# @tp @b MOSEK_PYTHONPATH @endtp
# Path to Python modules of this package. |
#
#
#
# @ingroup CMakeFindModules
##############################################################################
# ----------------------------------------------------------------------------
# optional components to look for
set (_MOSEK_OPTIONAL_COMPONENTS mex jar pypkg)
foreach (CMP IN LISTS _MOSEK_OPTIONAL_COMPONENTS)
set (MOSEK_FIND_${CMP} FALSE)
endforeach ()
foreach (CMP IN LISTS MOSEK_FIND_COMPONENTS)
if (NOT CMP MATCHES "^(mex|jar|pypkg)$")
message (FATAL_ERROR "Invalid MOSEK component: ${CMP}")
endif ()
set (MOSEK_FIND_${CMP} TRUE)
endforeach ()
# ----------------------------------------------------------------------------
# remember CMAKE_FIND_LIBRARY_SUFFIXES to be able to restore it
set (_MOSEK_CMAKE_FIND_LIBRARY_SUFFIXES "${CMAKE_FIND_LIBRARY_SUFFIXES}")
# ----------------------------------------------------------------------------
# versions - library suffixes
# known MOSEK versions, all entries have to be specified in descending order!
set (_MOSEK_VERSIONS_MAJOR 6)
set (_MOSEK6_VERSIONS 6.0)
# get a full list of particular versions (