Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
e161f428
Commit
e161f428
authored
May 24, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed PvAPI search on Windows #1927
parent
6455488f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
25 deletions
+35
-25
CMakeLists.txt
CMakeLists.txt
+30
-9
CMakeLists.txt
modules/highgui/CMakeLists.txt
+5
-16
cap_pvapi.cpp
modules/highgui/src/cap_pvapi.cpp
+0
-0
No files found.
CMakeLists.txt
View file @
e161f428
...
...
@@ -171,7 +171,7 @@ elseif(MSVC_IDE)
set
(
ENABLE_SOLUTION_FOLDERS0 ON
)
else
()
set
(
ENABLE_SOLUTION_FOLDERS0 OFF
)
endif
()
endif
()
# OpenCV build options
# ===================================================
...
...
@@ -312,7 +312,7 @@ if(UNIX)
include
(
cmake/OpenCVFindPkgConfig.cmake OPTIONAL
)
include
(
CheckFunctionExists
)
include
(
CheckIncludeFile
)
if
(
NOT APPLE
)
CHECK_INCLUDE_FILE
(
alloca.h HAVE_ALLOCA_H
)
CHECK_FUNCTION_EXISTS
(
alloca HAVE_ALLOCA
)
...
...
@@ -408,11 +408,32 @@ endif(WITH_UNICAP)
ocv_clear_vars
(
HAVE_PVAPI
)
if
(
WITH_PVAPI
)
find_path
(
PVAPI_INCLUDE_PATH
"PvApi.h"
PATHS
"/usr/local/include"
"/usr/include"
PATHS /usr/local /opt /usr ENV ProgramFiles ENV ProgramW6432
PATH_SUFFIXES include
"Allied Vision Technologies/GigESDK/inc-pc"
"AVT GigE SDK/inc-pc"
"GigESDK/inc-pc"
DOC
"The path to PvAPI header"
)
if
(
PVAPI_INCLUDE_PATH
)
set
(
HAVE_PVAPI TRUE
)
endif
()
if
(
X86 AND NOT WIN32
)
set
(
PVAPI_SDK_SUBDIR x86
)
elseif
(
X86_64
)
set
(
PVAPI_SDK_SUBDIR x64
)
elseif
(
CMAKE_SYSTEM_PROCESSOR MATCHES arm
)
set
(
PVAPI_SDK_SUBDIR arm
)
endif
()
get_filename_component
(
_PVAPI_LIBRARY
"
${
PVAPI_INCLUDE_PATH
}
/../lib-pc"
ABSOLUTE
)
if
(
PVAPI_SDK_SUBDIR
)
set
(
_PVAPI_LIBRARY
"
${
_PVAPI_LIBRARY
}
/
${
PVAPI_SDK_SUBDIR
}
"
)
endif
()
if
(
NOT WIN32 AND CMAKE_COMPILER_IS_GNUCXX
)
set
(
_PVAPI_LIBRARY
"
${
_PVAPI_LIBRARY
}
/
${
CMAKE_OPENCV_GCC_VERSION_MAJOR
}
.
${
CMAKE_OPENCV_GCC_VERSION_MINOR
}
"
)
endif
()
set
(
PVAPI_LIBRARY
"
${
_PVAPI_LIBRARY
}
/
${
CMAKE_STATIC_LIBRARY_PREFIX
}
PvAPI
${
CMAKE_STATIC_LIBRARY_SUFFIX
}
"
CACHE PATH
"The PvAPI library"
)
if
(
EXISTS
"
${
PVAPI_LIBRARY
}
"
)
set
(
HAVE_PVAPI TRUE
)
endif
()
endif
(
PVAPI_INCLUDE_PATH
)
endif
(
WITH_PVAPI
)
# --- Dc1394 ---
...
...
@@ -463,7 +484,7 @@ if(WITH_FFMPEG)
CHECK_MODULE
(
libavformat HAVE_FFMPEG_FORMAT
)
CHECK_MODULE
(
libavutil HAVE_FFMPEG_UTIL
)
CHECK_MODULE
(
libswscale HAVE_FFMPEG_SWSCALE
)
CHECK_INCLUDE_FILE
(
libavformat/avformat.h HAVE_GENTOO_FFMPEG
)
CHECK_INCLUDE_FILE
(
ffmpeg/avformat.h HAVE_FFMPEG_FFMPEG
)
if
(
NOT HAVE_GENTOO_FFMPEG AND NOT HAVE_FFMPEG_FFMPEG
)
...
...
@@ -592,7 +613,7 @@ if(WITH_CLP)
set
(
OPENCV_LINKER_LIBS
${
OPENCV_LINKER_LIBS
}
${
CLP_LIBRARIES
}
)
endif
()
endif
()
if
(
NOT CLP_FOUND
)
find_path
(
CLP_INCLUDE_PATH
"coin"
PATHS
"/usr/local/include"
"/usr/include"
"/opt/include"
...
...
@@ -607,7 +628,7 @@ if(WITH_CLP)
set
(
OPENCV_LINKER_LIBS
${
OPENCV_LINKER_LIBS
}
libClp libCoinUtils
)
endif
()
set
(
HAVE_CLP TRUE
)
endif
()
endif
()
endif
()
endif
(
WITH_CLP
)
...
...
@@ -623,7 +644,7 @@ include(cmake/OpenCVDetectPython.cmake REQUIRED)
if
(
ANDROID
)
include
(
cmake/OpenCVDetectApacheAnt.cmake REQUIRED
)
include
(
cmake/OpenCVDetectAndroidSDK.cmake REQUIRED
)
if
(
NOT ANDROID_TOOLS_Pkg_Revision GREATER 13
)
message
(
WARNING
"OpenCV requires Android SDK tools revision 14 or newer. Otherwise tests and samples will no be compiled."
)
endif
()
...
...
modules/highgui/CMakeLists.txt
View file @
e161f428
...
...
@@ -96,7 +96,7 @@ elseif(APPLE)
list
(
APPEND HIGHGUI_LIBRARIES
"-framework Cocoa"
)
endif
()
endif
()
if
(
WIN32
)
list
(
APPEND highgui_srcs src/cap_vfw.cpp src/cap_cmu.cpp src/cap_dshow.cpp
)
endif
(
WIN32
)
...
...
@@ -157,19 +157,8 @@ endif(HAVE_FFMPEG)
if
(
HAVE_PVAPI
)
add_definitions
(
-DHAVE_PVAPI
)
ocv_include_directories
(
${
PVAPI_INCLUDE_PATH
}
)
if
(
X86
)
set
(
PVAPI_SDK_SUBDIR x86
)
elseif
(
X86_64
)
set
(
PVAPI_SDK_SUBDIR x64
)
elseif
(
CMAKE_SYSTEM_PROCESSOR MATCHES arm
)
set
(
PVAPI_SDK_SUBDIR arm
)
endif
()
if
(
PVAPI_SDK_SUBDIR AND CMAKE_COMPILER_IS_GNUCXX
)
get_filename_component
(
PVAPI_EXPECTED_LIB_PATH
"
${
PVAPI_INCLUDE_PATH
}
/../lib-pc/
${
PVAPI_SDK_SUBDIR
}
/
${
CMAKE_OPENCV_GCC_VERSION_MAJOR
}
.
${
CMAKE_OPENCV_GCC_VERSION_MINOR
}
"
ABSOLUTE
)
link_directories
(
${
PVAPI_EXPECTED_LIB_PATH
}
)
endif
()
set
(
highgui_srcs src/cap_pvapi.cpp
${
highgui_srcs
}
)
set
(
HIGHGUI_LIBRARIES
${
HIGHGUI_LIBRARIES
}
PvAPI
)
list
(
APPEND HIGHGUI_LIBRARIES
${
PVAPI_LIBRARY
}
)
endif
()
if
(
WITH_IMAGEIO
)
...
...
@@ -241,11 +230,11 @@ if(WIN32 AND WITH_FFMPEG)
if
(
MSVC64 OR MINGW64
)
set
(
FFMPEG_SUFFIX _64
)
endif
()
set
(
ffmpeg_bare_name
"opencv_ffmpeg
${
FFMPEG_SUFFIX
}
.dll"
)
set
(
ffmpeg_bare_name_ver
"opencv_ffmpeg
${
OPENCV_DLLVERSION
}${
FFMPEG_SUFFIX
}
.dll"
)
set
(
ffmpeg_path
"
${
OpenCV_SOURCE_DIR
}
/3rdparty/ffmpeg/
${
ffmpeg_bare_name
}
"
)
#if(MSVC AND CMAKE_VERSION VERSION_GREATER "2.8.2")
# add_custom_command(TARGET ${the_module} POST_BUILD
# COMMAND ${CMAKE_COMMAND} -E copy "${ffmpeg_path}" "${EXECUTABLE_OUTPUT_PATH}/$<CONFIGURATION>/${ffmpeg_bare_name_ver}"
...
...
@@ -265,7 +254,7 @@ if(WIN32 AND WITH_FFMPEG)
COMMAND
${
CMAKE_COMMAND
}
-E copy
"
${
ffmpeg_path
}
"
"
${
EXECUTABLE_OUTPUT_PATH
}
/
${
ffmpeg_bare_name_ver
}
"
COMMENT
"Copying
${
ffmpeg_path
}
to the output directory"
)
endif
()
install
(
FILES
"
${
ffmpeg_path
}
"
DESTINATION bin COMPONENT main RENAME
"
${
ffmpeg_bare_name_ver
}
"
)
endif
()
...
...
modules/highgui/src/cap_pvapi.cpp
View file @
e161f428
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment