summaryrefslogtreecommitdiff
path: root/src/app
diff options
context:
space:
mode:
authorCristian Adam <cristian.adam@gmail.com>2019-05-20 11:44:19 +0200
committerCristian Adam <cristian.adam@qt.io>2019-05-20 11:34:19 +0000
commitcf801ac930b1bb3f9d847a2203d5082b5cb43de5 (patch)
treea5e747ee6681c646d5558ffa8ce9f71ad30ef3c1 /src/app
parent4b15341358e4810cde649016ca9f5c43c1a848f9 (diff)
downloadqt-creator-cf801ac930b1bb3f9d847a2203d5082b5cb43de5.tar.gz
CMake build / Win32: Add rc file to qtcreator.exe
Change-Id: I47580f0357866d7931d0deb4daa02f601537722e Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/app')
-rw-r--r--src/app/CMakeLists.txt20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt
index 8ae808e2ff..3375fbee0e 100644
--- a/src/app/CMakeLists.txt
+++ b/src/app/CMakeLists.txt
@@ -13,6 +13,26 @@ add_qtc_executable(qtcreator
DESTINATION "${IDE_APP_PATH}"
)
+if (WIN32)
+ set(RC_APPLICATION_NAME "${IDE_DISPLAY_NAME}")
+ set(RC_VERSION "${IDE_VERSION}.0")
+ set(RC_VERSION_STRING "${IDE_VERSION_DISPLAY}")
+ set(RC_COPYRIGHT "2008-${IDE_COPYRIGHT_YEAR} The Qt Company Ltd")
+
+ string(REPLACE " " "\\x20" RC_APPLICATION_NAME "${RC_APPLICATION_NAME}")
+ string(REPLACE " " "\\X20" RC_COPYRIGHT "${RC_COPYRIGHT}")
+ string(REPLACE "." "," RC_VERSION ${RC_VERSION})
+
+ target_compile_definitions(qtcreator PRIVATE
+ RC_APPLICATION_NAME="${RC_APPLICATION_NAME}"
+ RC_VERSION="${RC_VERSION}"
+ RC_VERSION_STRING="${RC_VERSION_STRING}"
+ RC_COPYRIGHT="${RC_COPYRIGHT}"
+ )
+
+ target_sources(qtcreator PRIVATE qtcreator.rc)
+endif()
+
add_custom_command(TARGET qtcreator POST_BUILD
COMMAND "${CMAKE_COMMAND}" -E copy_directory
"${PROJECT_SOURCE_DIR}/share/qtcreator"