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
2935fcea
Commit
2935fcea
authored
Sep 14, 2016
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
apps: add opencv_version command line tool
parent
473dba11
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
61 additions
and
0 deletions
+61
-0
CMakeLists.txt
apps/CMakeLists.txt
+1
-0
CMakeLists.txt
apps/version/CMakeLists.txt
+32
-0
opencv_version.cpp
apps/version/opencv_version.cpp
+28
-0
No files found.
apps/CMakeLists.txt
View file @
2935fcea
...
...
@@ -6,3 +6,4 @@ add_subdirectory(createsamples)
add_subdirectory
(
annotation
)
add_subdirectory
(
visualisation
)
add_subdirectory
(
interactive-calibration
)
add_subdirectory
(
version
)
apps/version/CMakeLists.txt
0 → 100644
View file @
2935fcea
SET
(
OPENCV_APPLICATION_DEPS opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs opencv_videoio
)
ocv_check_dependencies
(
${
OPENCV_APPLICATION_DEPS
}
)
if
(
NOT OCV_DEPENDENCIES_FOUND
)
return
()
endif
()
project
(
opencv_version
)
set
(
the_target opencv_version
)
ocv_target_include_directories
(
${
the_target
}
PRIVATE
"
${
CMAKE_CURRENT_SOURCE_DIR
}
"
"
${
OpenCV_SOURCE_DIR
}
/include/opencv"
)
ocv_target_include_modules_recurse
(
${
the_target
}
${
OPENCV_APPLICATION_DEPS
}
)
file
(
GLOB SRCS *.cpp
)
ocv_add_executable
(
${
the_target
}
${
SRCS
}
)
ocv_target_link_libraries
(
${
the_target
}
${
OPENCV_APPLICATION_DEPS
}
)
set_target_properties
(
${
the_target
}
PROPERTIES
DEBUG_POSTFIX
"
${
OPENCV_DEBUG_POSTFIX
}
"
RUNTIME_OUTPUT_DIRECTORY
${
EXECUTABLE_OUTPUT_PATH
}
OUTPUT_NAME
"opencv_version"
)
set_target_properties
(
${
the_target
}
PROPERTIES FOLDER
"applications"
)
if
(
INSTALL_CREATE_DISTRIB
)
if
(
BUILD_SHARED_LIBS
)
install
(
TARGETS
${
the_target
}
RUNTIME DESTINATION
${
OPENCV_BIN_INSTALL_PATH
}
CONFIGURATIONS Release COMPONENT libs
)
endif
()
else
()
install
(
TARGETS
${
the_target
}
RUNTIME DESTINATION
${
OPENCV_BIN_INSTALL_PATH
}
COMPONENT libs
)
endif
()
apps/version/opencv_version.cpp
0 → 100644
View file @
2935fcea
// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
#include <iostream>
#include <opencv2/core.hpp>
int
main
(
int
argc
,
const
char
**
argv
)
{
cv
::
CommandLineParser
parser
(
argc
,
argv
,
"{ help h usage ? | | show this help message }"
"{ verbose v | | show build configuration log }"
);
if
(
parser
.
has
(
"help"
))
{
parser
.
printMessage
();
}
else
if
(
parser
.
has
(
"verbose"
))
{
std
::
cout
<<
cv
::
getBuildInformation
().
c_str
()
<<
std
::
endl
;
}
else
{
std
::
cout
<<
CV_VERSION
<<
std
::
endl
;
}
return
0
;
}
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