Skip to content

Commit

Permalink
Fix #9329: [CMake] FindVersion.cmake relied on internal cmake variable (
Browse files Browse the repository at this point in the history
  • Loading branch information
glx22 committed Jun 10, 2021
1 parent 2924ac4 commit 076f3d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ add_custom_target(find_version
-DREV_MAJOR=${PROJECT_VERSION_MAJOR}
-DREV_MINOR=${PROJECT_VERSION_MINOR}
-DREV_BUILD=${PROJECT_VERSION_PATCH}
-DWINDOWS=${WIN32}
-P "${CMAKE_SOURCE_DIR}/cmake/scripts/FindVersion.cmake"
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
BYPRODUCTS ${GENERATED_SOURCE_FILES}
Expand Down
2 changes: 1 addition & 1 deletion cmake/scripts/FindVersion.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ else()
configure_file("${CMAKE_SOURCE_DIR}/src/rev.cpp.in"
"${FIND_VERSION_BINARY_DIR}/rev.cpp")

if(WIN32)
if(WINDOWS)
message(STATUS "Generating ottdres.rc")
configure_file("${CMAKE_SOURCE_DIR}/src/os/windows/ottdres.rc.in"
"${FIND_VERSION_BINARY_DIR}/ottdres.rc")
Expand Down

0 comments on commit 076f3d2

Please sign in to comment.