diff --git a/CMakeLists.txt b/CMakeLists.txt index afe12a13..fa9e5382 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,10 @@ include(GitCommands) # Set the project version include(K4AProjectVersion) +# Default to not embed an icon in resources +set(K4A_USE_ICON 0) +set(K4A_ICON_PATH ${CMAKE_CURRENT_LIST_DIR}/kinect-viewer.ico) + set(PROJ_DIR ${CMAKE_CURRENT_LIST_DIR}) set(INCLUDE_DIR ${PROJ_DIR}/include) diff --git a/kinect-viewer.ico b/kinect-viewer.ico new file mode 100644 index 00000000..cf4dc0e1 Binary files /dev/null and b/kinect-viewer.ico differ diff --git a/tools/k4aviewer/CMakeLists.txt b/tools/k4aviewer/CMakeLists.txt index 1c272429..98578c03 100644 --- a/tools/k4aviewer/CMakeLists.txt +++ b/tools/k4aviewer/CMakeLists.txt @@ -41,6 +41,7 @@ set(SOURCE_FILES # to embed version information set(K4A_FILEDESCRIPTION "Azure Kinect Viewer") set(K4A_ORIGINALFILENAME "k4aviewer.exe") +set(K4A_USE_ICON 1) configure_file( ${K4A_VERSION_RC} ${CMAKE_CURRENT_BINARY_DIR}/version.rc diff --git a/version.rc.in b/version.rc.in index 4ea707d2..a9f81445 100644 --- a/version.rc.in +++ b/version.rc.in @@ -24,6 +24,10 @@ #define VER_PRIVATEBUILD 0 #define VER_PRERELEASE 0 +#if @K4A_USE_ICON@ +APP_ICON ICON "@K4A_ICON_PATH@" +#endif + VS_VERSION_INFO VERSIONINFO FILEVERSION VER_FILEVERSION PRODUCTVERSION VER_PRODUCTVERSION