blob: 45fbe164291b248c293b8986f0994b81b0043a97 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
set(ADD_VERSION_FILE_DIR "${CMAKE_CURRENT_LIST_DIR}")
function(add_version_file OUTPUT TEMPLATE)
add_custom_target(
${OUTPUT}
BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT}"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/${TEMPLATE}"
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
COMMAND
cmake
-DOUTPUT='${CMAKE_CURRENT_BINARY_DIR}/${OUTPUT}'
-DTEMPLATE='${CMAKE_CURRENT_SOURCE_DIR}/${TEMPLATE}'
-DSTEAM_APPID=${STEAM_APPID}
-DSTEAM_DEPOTID_WINDOWS=${STEAM_DEPOTID_WINDOWS}
-DSTEAM_DEPOTID_LINUX=${STEAM_DEPOTID_LINUX}
-P "${ADD_VERSION_FILE_DIR}/generate_version_file.cmake"
)
endfunction()
|