Skip to content

Commit

Permalink
Use Clang version numbers for the Windows VERSIONINFO resource.
Browse files Browse the repository at this point in the history
When setting the VERSIONINFO resource to embed version information into exe and
DLL files on Windows, override the default LLVM version number values with their
clang equivalents.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@239617 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
gregbedwell committed Jun 12, 2015
1 parent 188d635 commit eec0021
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,17 @@ function(clang_tablegen)
endif()
endfunction(clang_tablegen)

macro(set_clang_windows_version_resource_properties name)
if(DEFINED windows_resource_file)
set_windows_version_resource_properties(${name} ${windows_resource_file}
VERSION_MAJOR ${CLANG_VERSION_MAJOR}
VERSION_MINOR ${CLANG_VERSION_MINOR}
VERSION_PATCHLEVEL ${CLANG_VERSION_PATCHLEVEL}
VERSION_STRING "${CLANG_VERSION} (${BACKEND_PACKAGE_STRING})"
PRODUCT_NAME "clang")
endif()
endmacro()

macro(add_clang_library name)
cmake_parse_arguments(ARG
""
Expand Down Expand Up @@ -377,11 +388,13 @@ macro(add_clang_library name)
endif()

set_target_properties(${name} PROPERTIES FOLDER "Clang libraries")
set_clang_windows_version_resource_properties(${name})
endmacro(add_clang_library)

macro(add_clang_executable name)
add_llvm_executable( ${name} ${ARGN} )
set_target_properties(${name} PROPERTIES FOLDER "Clang executables")
set_clang_windows_version_resource_properties(${name})
endmacro(add_clang_executable)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
Expand Down

0 comments on commit eec0021

Please sign in to comment.