Don't be dynamic for win32 rc crap

This commit is contained in:
Jason Rhinelander 2022-05-30 14:59:12 -03:00
parent 1dfc2e883b
commit 6a2114fa1d
No known key found for this signature in database
GPG Key ID: C4992CE7A88D4262

View File

@ -19,28 +19,17 @@ if(EXISTS "${GIT_INDEX_FILE}" AND ( GIT_FOUND OR Git_FOUND) )
"-P" "${CMAKE_CURRENT_LIST_DIR}/GenVersion.cmake" "-P" "${CMAKE_CURRENT_LIST_DIR}/GenVersion.cmake"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/constants/version.cpp.in" DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/constants/version.cpp.in"
"${GIT_INDEX_FILE}") "${GIT_INDEX_FILE}")
if(WIN32)
foreach(exe IN ITEMS lokinet lokinet-vpn lokinet-bootstrap)
add_custom_command(
OUTPUT "${CMAKE_BINARY_DIR}/${exe}.rc"
COMMAND "${CMAKE_COMMAND}"
${genversion_args}
"-D" "lokinet_EXE_NAME=${exe}.exe"
"-D" "SRC=${CMAKE_CURRENT_SOURCE_DIR}/win32/version.rc.in"
"-D" "DEST=${CMAKE_BINARY_DIR}/${exe}.rc"
"-P" "${CMAKE_CURRENT_LIST_DIR}/GenVersion.cmake"
DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/win32/version.rc.in"
"${GIT_INDEX_FILE}")
endforeach()
endif()
else() else()
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/constants/version.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/constants/version.cpp" @ONLY) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/constants/version.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/constants/version.cpp" @ONLY)
if(WIN32) endif()
foreach(exe IN ITEMS lokinet lokinet-vpn lokinet-bootstrap)
set(lokinet_EXE_NAME "${exe}.exe")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/win32/version.rc.in" "${CMAKE_BINARY_DIR}/${exe}.rc" @ONLY) if(WIN32)
endforeach() foreach(exe IN ITEMS lokinet lokinet-vpn lokinet-bootstrap)
endif() set(lokinet_EXE_NAME "${exe}.exe")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/win32/version.rc.in" "${CMAKE_BINARY_DIR}/${exe}.rc" @ONLY)
set_property(SOURCE "${CMAKE_BINARY_DIR}/${exe}.rc" PROPERTY GENERATED 1)
endforeach()
endif() endif()
add_custom_target(genversion_cpp DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/constants/version.cpp") add_custom_target(genversion_cpp DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/constants/version.cpp")