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
db35e13b
Commit
db35e13b
authored
Jun 20, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: added VERSIONINFO resource
parent
68d01972
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
118 additions
and
1 deletion
+118
-1
.gitattributes
.gitattributes
+2
-0
OpenCVModule.cmake
cmake/OpenCVModule.cmake
+25
-1
OpenCVUtils.cmake
cmake/OpenCVUtils.cmake
+46
-0
OpenCVVersion.cmake
cmake/OpenCVVersion.cmake
+7
-0
vs_version.rc.in
cmake/templates/vs_version.rc.in
+38
-0
No files found.
.gitattributes
View file @
db35e13b
...
...
@@ -31,6 +31,8 @@
*.py text
*.qrc text
*.qss text
*.rc text
*.rc.in text
*.S text
*.sbt text
*.scala text
...
...
cmake/OpenCVModule.cmake
View file @
db35e13b
...
...
@@ -800,11 +800,35 @@ macro(_ocv_create_module)
endforeach
()
endif
()
if
(
WIN32 AND BUILD_SHARED_LIBS AND NOT OPENCV_VS_VERSIONINFO_SKIP
)
if
(
DEFINED OPENCV_VS_VERSIONINFO_FILE
)
set
(
_VS_VERSION_FILE
"
${
OPENCV_VS_VERSIONINFO_FILE
}
"
)
elseif
(
DEFINED OPENCV_VS_VERSIONINFO_
${
the_module
}
_FILE
)
set
(
_VS_VERSION_FILE
"
${
OPENCV_VS_VERSIONINFO_
${
the_module
}
_FILE")
elseif(NOT OPENCV_VS_VERSIONINFO_SKIP_GENERATION)
set(_VS_VERSION_FILE "
${
CMAKE_CURRENT_BINARY_DIR
}
/vs_version.rc")
ocv_generate_vs_version_file("
${
_VS_VERSION_FILE
}
"
NAME "
${
the_module
}
"
FILEDESCRIPTION "OpenCV module:
${
OPENCV_MODULE_
${
the_module
}
_DESCRIPTION
}
"
INTERNALNAME "
${
the_module
}${
OPENCV_DLLVERSION
}
"
ORIGINALFILENAME "
${
the_module
}${
OPENCV_DLLVERSION
}
.dll"
)
endif()
if(_VS_VERSION_FILE)
if(NOT EXISTS "
${
_VS_VERSION_FILE
}
")
message(STATUS "
${
the_module
}
: Required .rc file is missing:
${
_VS_VERSION_FILE
}
")
endif()
source_group("Src" FILES "
${
_VS_VERSION_FILE
}
")
endif()
endif()
source_group("Include" FILES "
${
OPENCV_CONFIG_FILE_INCLUDE_DIR
}
/cvconfig.h" "
${
OPENCV_CONFIG_FILE_INCLUDE_DIR
}
/opencv2/opencv_modules.hpp")
source_group("Src" FILES "
${${
the_module
}
_pch
}
")
ocv_add_library(
${
the_module
}
${
OPENCV_MODULE_TYPE
}
${
OPENCV_MODULE_
${
the_module
}
_HEADERS
}
${
OPENCV_MODULE_
${
the_module
}
_SOURCES
}
"
${
OPENCV_CONFIG_FILE_INCLUDE_DIR
}
/cvconfig.h" "
${
OPENCV_CONFIG_FILE_INCLUDE_DIR
}
/opencv2/opencv_modules.hpp"
${${
the_module
}
_pch
}
${
sub_objs
}
)
${${
the_module
}
_pch
}
${
sub_objs
}
${
_VS_VERSION_FILE
}
)
if (cuda_objs)
target_link_libraries(
${
the_module
}
${
cuda_objs
}
)
...
...
cmake/OpenCVUtils.cmake
View file @
db35e13b
...
...
@@ -1128,3 +1128,49 @@ macro(ocv_add_testdata basedir dest_subdir)
endif
()
endif
()
endmacro
()
macro
(
ocv_generate_vs_version_file DESTINATION
)
cmake_parse_arguments
(
VS_VER
""
"NAME;FILEDESCRIPTION;FILEVERSION;INTERNALNAME;COPYRIGHT;ORIGINALFILENAME;PRODUCTNAME;PRODUCTVERSION;COMMENTS;FILEVERSION_QUAD;PRODUCTVERSION_QUAD"
""
${
ARGN
}
)
macro
(
__vs_ver_update_variable name
)
if
(
VS_VER_NAME AND DEFINED OPENCV_
${
VS_VER_NAME
}
_VS_VER_
${
name
}
)
set
(
OPENCV_VS_VER_
${
name
}
"
${
OPENCV_
${
VS_VER_NAME
}
_VS_VER_
${
name
}}
"
)
elseif
(
VS_VER_
${
name
}
)
set
(
OPENCV_VS_VER_
${
name
}
"
${
VS_VER_
${
name
}}
"
)
endif
()
endmacro
()
__vs_ver_update_variable
(
FILEVERSION_QUAD
)
__vs_ver_update_variable
(
PRODUCTVERSION_QUAD
)
macro
(
__vs_ver_update_str_variable name
)
if
(
VS_VER_NAME AND DEFINED OPENCV_
${
VS_VER_NAME
}
_VS_VER_
${
name
}
)
set
(
OPENCV_VS_VER_
${
name
}
_STR
"
${
OPENCV_
${
VS_VER_NAME
}
_VS_VER_
${
name
}}
"
)
elseif
(
VS_VER_
${
name
}
)
set
(
OPENCV_VS_VER_
${
name
}
_STR
"
${
VS_VER_
${
name
}}
"
)
endif
()
endmacro
()
__vs_ver_update_str_variable
(
FILEDESCRIPTION
)
__vs_ver_update_str_variable
(
FILEVERSION
)
__vs_ver_update_str_variable
(
INTERNALNAME
)
__vs_ver_update_str_variable
(
COPYRIGHT
)
__vs_ver_update_str_variable
(
ORIGINALFILENAME
)
__vs_ver_update_str_variable
(
PRODUCTNAME
)
__vs_ver_update_str_variable
(
PRODUCTVERSION
)
__vs_ver_update_str_variable
(
COMMENTS
)
if
(
OPENCV_VS_VER_COPYRIGHT_STR
)
set
(
OPENCV_VS_VER_HAVE_COPYRIGHT_STR 1
)
else
()
set
(
OPENCV_VS_VER_HAVE_COPYRIGHT_STR 0
)
endif
()
if
(
OPENCV_VS_VER_COMMENTS_STR
)
set
(
OPENCV_VS_VER_HAVE_COMMENTS_STR 1
)
else
()
set
(
OPENCV_VS_VER_HAVE_COMMENTS_STR 0
)
endif
()
configure_file
(
"
${
OpenCV_SOURCE_DIR
}
/cmake/templates/vs_version.rc.in"
"
${
DESTINATION
}
"
@ONLY
)
endmacro
()
cmake/OpenCVVersion.cmake
View file @
db35e13b
...
...
@@ -16,3 +16,10 @@ set(OPENCV_LIBVERSION "${OPENCV_VERSION_MAJOR}.${OPENCV_VERSION_MINOR}.${OPENCV_
# create a dependency on version file
# we never use output of the following command but cmake will rerun automatically if the version file changes
configure_file
(
"
${
OPENCV_VERSION_FILE
}
"
"
${
CMAKE_BINARY_DIR
}
/junk/version.junk"
COPYONLY
)
ocv_update
(
OPENCV_VS_VER_FILEVERSION_QUAD
"
${
OPENCV_VERSION_MAJOR
}
,
${
OPENCV_VERSION_MINOR
}
,
${
OPENCV_VERSION_PATCH
}
,0"
)
ocv_update
(
OPENCV_VS_VER_PRODUCTVERSION_QUAD
"
${
OPENCV_VERSION_MAJOR
}
,
${
OPENCV_VERSION_MINOR
}
,
${
OPENCV_VERSION_PATCH
}
,0"
)
ocv_update
(
OPENCV_VS_VER_FILEVERSION_STR
"
${
OPENCV_VERSION
}
"
)
ocv_update
(
OPENCV_VS_VER_PRODUCTVERSION_STR
"
${
OPENCV_VERSION
}
"
)
ocv_update
(
OPENCV_VS_VER_PRODUCTNAME_STR
"OpenCV library"
)
ocv_update
(
OPENCV_VS_VER_COMMENTS_STR
"http://opencv.org/"
)
cmake/templates/vs_version.rc.in
0 → 100644
View file @
db35e13b
#include <winver.h>
VS_VERSION_INFO VERSIONINFO
FILEVERSION @OPENCV_VS_VER_FILEVERSION_QUAD@
PRODUCTVERSION @OPENCV_VS_VER_PRODUCTVERSION_QUAD@
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
FILEFLAGS 1
#else
FILEFLAGS 0
#endif
FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE 0
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "FileDescription", "@OPENCV_VS_VER_FILEDESCRIPTION_STR@\0"
VALUE "FileVersion", "@OPENCV_VS_VER_FILEVERSION_STR@\0"
VALUE "InternalName", "@OPENCV_VS_VER_INTERNALNAME_STR@\0"
#if @OPENCV_VS_VER_HAVE_COPYRIGHT_STR@
VALUE "LegalCopyright", "@OPENCV_VS_VER_COPYRIGHT_STR@\0"
#endif
VALUE "OriginalFilename", "@OPENCV_VS_VER_ORIGINALFILENAME_STR@\0"
VALUE "ProductName", "@OPENCV_VS_VER_PRODUCTNAME_STR@\0"
VALUE "ProductVersion", "@OPENCV_VS_VER_PRODUCTVERSION_STR@\0"
#if @OPENCV_VS_VER_HAVE_COMMENTS_STR@
VALUE "Comments", "@OPENCV_VS_VER_COMMENTS_STR@\0"
#endif
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409, 1252
END
END
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