Commit 5fe21e49 authored by Alexander Alekhin's avatar Alexander Alekhin

cmake: fix build on MacOSX

parent 56eea817
cmake_minimum_required(VERSION 2.8)
if(IOS OR WINRT)
if(APPLE_FRAMEWORK OR WINRT)
ocv_module_disable(dnn)
endif()
......
......@@ -23,6 +23,20 @@
# them with mex.
# ----------------------------------------------------------------------------
# ----------------------------------------------------------------------------
# Architecture checks
# ----------------------------------------------------------------------------
# make sure we're on a supported architecture with Matlab and python installed
if(APPLE_FRAMEWORK OR ANDROID OR NOT MATLAB_FOUND)
ocv_module_disable(matlab)
return()
elseif (NOT PYTHON_DEFAULT_AVAILABLE)
message(WARNING "A required dependency of the matlab module (Python) was not found. Disabling Matlab bindings...")
ocv_module_disable(matlab)
return()
endif()
# PREPEND
# Given a list of strings IN and a TOKEN, prepend the token to each string
# and append to OUT. This is used for passing command line "-I", "-L" and "-l"
......@@ -44,19 +58,6 @@ macro(WARN_MIXED_PRECISION COMPILER_BITNESS MATLAB_BITNESS)
message(WARNING ${MSG})
endmacro()
# ----------------------------------------------------------------------------
# Architecture checks
# ----------------------------------------------------------------------------
# make sure we're on a supported architecture with Matlab and python installed
if (IOS OR ANDROID OR NOT MATLAB_FOUND)
ocv_module_disable(matlab)
return()
elseif (NOT PYTHON_DEFAULT_AVAILABLE)
message(WARNING "A required dependency of the matlab module (PythonLibs) was not found. Disabling Matlab bindings...")
ocv_module_disable(matlab)
return()
endif()
# If the user built OpenCV as X-bit, but they have a Y-bit version of Matlab,
# attempting to link to OpenCV during binding generation will fail, since
......
set(the_description "Object detection algorithms")
ocv_define_module(xobjdetect opencv_core opencv_imgproc opencv_highgui opencv_objdetect WRAP python)
if (NOT IOS)
if (NOT APPLE_FRAMEWORK)
add_subdirectory(tools)
endif()
......@@ -25,7 +25,6 @@ set_target_properties(${the_target} PROPERTIES
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
INSTALL_NAME_DIR lib
OUTPUT_NAME ${the_target})
if(ENABLE_SOLUTION_FOLDERS)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment