a06c37f708
- obey CFLAGS, from Brad - strip ^M from file being patched, from me
54 lines
2.3 KiB
Plaintext
54 lines
2.3 KiB
Plaintext
$OpenBSD: patch-CMakeLists_txt,v 1.2 2011/11/12 16:49:43 sthen Exp $
|
|
--- CMakeLists.txt.orig Sun Dec 5 03:35:23 2010
|
|
+++ CMakeLists.txt Fri Nov 11 23:27:21 2011
|
|
@@ -233,7 +233,6 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
|
set(USE_OMIT_FRAME_POINTER ON CACHE BOOL "Enable -fomit-frame-pointer for GCC")
|
|
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES arm*)
|
|
# We can use only -O2 because the -O3 causes gcc crash
|
|
- set(USE_O2 ON CACHE BOOL "Enable -O2 for GCC")
|
|
set(USE_FAST_MATH ON CACHE BOOL "Enable -ffast-math for GCC")
|
|
endif()
|
|
|
|
@@ -255,13 +254,11 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
|
endif()
|
|
|
|
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES powerpc*)
|
|
- set(USE_O3 ON CACHE BOOL "Enable -O3 for GCC")
|
|
set(ENABLE_POWERPC ON CACHE BOOL "Enable PowerPC for GCC")
|
|
endif ()
|
|
|
|
if(X86 OR X86_64)
|
|
# enable everything, since the available set of instructions is checked at runtime
|
|
- set(USE_O3 ON CACHE BOOL "Enable -O3")
|
|
set(USE_FAST_MATH ON CACHE BOOL "Enable -ffast-math")
|
|
set(ENABLE_SSE ON CACHE BOOL "Enable SSE instructions")
|
|
set(ENABLE_SSE2 ON CACHE BOOL "Enable SSE2 instructions")
|
|
@@ -430,7 +427,7 @@ if(UNIX)
|
|
if(WITH_V4L)
|
|
CHECK_MODULE(libv4l1 HAVE_LIBV4L)
|
|
CHECK_INCLUDE_FILE(linux/videodev.h HAVE_CAMV4L)
|
|
- CHECK_INCLUDE_FILE(linux/videodev2.h HAVE_CAMV4L2)
|
|
+ CHECK_INCLUDE_FILE(sys/videoio.h HAVE_CAMV4L2)
|
|
else()
|
|
set(HAVE_LIBV4L FALSE)
|
|
set(HAVE_CAMV4L FALSE)
|
|
@@ -464,7 +461,8 @@ if(UNIX)
|
|
endif()
|
|
endif()
|
|
|
|
- if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
|
|
+ if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR ${CMAKE_SYSTEM_NAME}
|
|
+ MATCHES "NetBSD" OR ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
|
|
set(OPENCV_LINKER_LIBS m pthread)
|
|
else()
|
|
set(OPENCV_LINKER_LIBS dl m pthread rt)
|
|
@@ -865,7 +863,7 @@ include_directories("."
|
|
# Should be set to true for development
|
|
set(OPENCV_WARNINGS_ARE_ERRORS OFF CACHE BOOL "Treat warnings as errors")
|
|
|
|
-set(EXTRA_C_FLAGS "")
|
|
+set(EXTRA_C_FLAGS "-DHAVE_JPEG -DHAVE_TIFF -DHAVE_PNG -DHAVE_JASPER -DHAVE_OPENEXR")
|
|
set(EXTRA_C_FLAGS_RELEASE "")
|
|
set(EXTRA_C_FLAGS_DEBUG "")
|
|
set(EXTRA_EXE_LINKER_FLAGS "")
|