summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt1
-rw-r--r--cmake/scripts/FindVersion.cmake2
2 files changed, 2 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d060ffbbf..6cc2f7e2a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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}
diff --git a/cmake/scripts/FindVersion.cmake b/cmake/scripts/FindVersion.cmake
index 6e4a2b390..43255e801 100644
--- a/cmake/scripts/FindVersion.cmake
+++ b/cmake/scripts/FindVersion.cmake
@@ -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")