Browse Source

Only compile with exe icon if icon file exists

master
C. J. Howard 4 years ago
parent
commit
6c4eea2cca
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      CMakeLists.txt

+ 5
- 5
CMakeLists.txt View File

@ -51,11 +51,11 @@ if(MSVC)
# Generate Windows icon resource file # Generate Windows icon resource file
set(ICON_FILE "${PROJECT_SOURCE_DIR}/../antkeeper-data/src/icons/antkeeper.ico") set(ICON_FILE "${PROJECT_SOURCE_DIR}/../antkeeper-data/src/icons/antkeeper.ico")
configure_file(${PROJECT_SOURCE_DIR}/src/platform/windows/icon.rc.in
${PROJECT_BINARY_DIR}/src/platform/windows/icon.rc)
# Add executable icon
list(APPEND SOURCE_FILES "${PROJECT_BINARY_DIR}/src/platform/windows/icon.rc")
if(EXISTS "${ICON_FILE}")
configure_file(${PROJECT_SOURCE_DIR}/src/platform/windows/icon.rc.in
${PROJECT_BINARY_DIR}/src/platform/windows/icon.rc)
list(APPEND SOURCE_FILES "${PROJECT_BINARY_DIR}/src/platform/windows/icon.rc")
endif()
# Make DPI-aware on Windows # Make DPI-aware on Windows
list(APPEND SOURCE_FILES "${PROJECT_SOURCE_DIR}/src/platform/windows/dpi-aware.manifest") list(APPEND SOURCE_FILES "${PROJECT_SOURCE_DIR}/src/platform/windows/dpi-aware.manifest")

Loading…
Cancel
Save