Skip to content

Commit

Permalink
adds script to generate vc-version-info
Browse files Browse the repository at this point in the history
  • Loading branch information
knoxfighter committed Mar 2, 2024
1 parent f0c15b0 commit 86c0f6a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cmake/vs-version.cmake
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
function(test)
function(generate_version_file)
# set() all needed variables here, they are only set in function scope
set(options)
set(oneValueKeywords VERSION_MAJOR VERSION_MINOR VERSION_PATCH VERSION_REF INTERNAL_NAME COPYRIGHT ORIGINAL_FILENAME PRODUCT_NAME)
set(multiValueKeywords)
set(oneValueArgs VERSION_MAJOR VERSION_MINOR VERSION_PATCH VERSION_REF INTERNAL_NAME COPYRIGHT ORIGINAL_FILENAME PRODUCT_NAME)
set(multiValueArgs)

# cmake_parse_arguments
cmake_parse_arguments(PROJECT "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
Expand Down Expand Up @@ -40,7 +40,7 @@ function(test)
message(FATAL_ERROR "PRODUCT_NAME has to be defined!")
endif ()

configure_file("${CMAKE_CURRENT_FUNCTION_LIST_DIR}/VersionInfo.rc.in" VersionInfo.rc @ONLY)
configure_file("${CMAKE_CURRENT_FUNCTION_LIST_DIR}/VersionInfo.rc.in" "${CMAKE_CURRENT_BINARY_DIR}/VersionInfo.rc" @ONLY)

message(FATAL_ERROR "test was called!")
set(VERSION_FILE "${CMAKE_CURRENT_BINARY_DIR}/VersionInfo.rc" PARENT_SCOPE)
endfunction()

0 comments on commit 86c0f6a

Please sign in to comment.