Skip to content

Commit

Permalink
Fix uricamic#30, Apple is Unix, so check for Apple first
Browse files Browse the repository at this point in the history
In the examples CMakeLists.txt, explicit setting CV libs caused
compilation errors on OS X.
  • Loading branch information
ashgillman committed Aug 21, 2015
1 parent b83a8bc commit 893a39e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,23 @@ find_package( OpenCV REQUIRED )
include_directories(${OPENCV_INCLUDE_DIR})

if (${OpenCV_VERSION_MINOR} LESS 3)
if (UNIX)
if (APPLE)
elseif (UNIX)
set(CV_LIBS_1 highgui)
set(CV_LIBS_2 cxcore cv cvaux)
elseif (WIN32)
set(CV_LIBS_1 highgui${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH})
set(CV_LIBS_2 cxcore${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH} cv${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH} cvaux${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH})
elseif (APPLE)
endif (UNIX)
endif (APPLE)
else(${OpenCV_VERSION_MINOR} LESS 3)
if (UNIX)
if (APPLE)
elseif (UNIX)
set(CV_LIBS_1 opencv_highgui)
set(CV_LIBS_2 opencv_core opencv_objdetect)
elseif (WIN32)
set(CV_LIBS_1 opencv_highgui${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH})
set(CV_LIBS_2 opencv_core${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH} opencv_objdetect${OpenCV_VERSION_MAJOR}${OpenCV_VERSION_MINOR}${OpenCV_VERSION_PATCH})
elseif (APPLE)
endif (UNIX)
endif (APPLE)
endif(${OpenCV_VERSION_MINOR} LESS 3)

set(${PROJECT_NAME}_simple_example_srcs simple_example.cpp)
Expand Down

0 comments on commit 893a39e

Please sign in to comment.