aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ef17563e..33d58a6f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -611,6 +611,14 @@ if(HAVE_GETOPT_LONG)
target_link_libraries(xzdec PRIVATE liblzma)
+ if(WIN32)
+ # Add the Windows resource file for xzdec.exe.
+ target_sources(xz PRIVATE src/xzdec/xzdec_w32res.rc)
+ set_target_properties(xz PROPERTIES
+ LINK_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/common/common_w32res.rc"
+ )
+ endif()
+
tuklib_progname(xzdec)
install(TARGETS xzdec
@@ -682,6 +690,14 @@ if(NOT MSVC AND HAVE_GETOPT_LONG)
target_compile_definitions(xz PRIVATE ASSUME_RAM=128)
+ if(WIN32)
+ # Add the Windows resource file for xz.exe.
+ target_sources(xz PRIVATE src/xz/xz_w32res.rc)
+ set_target_properties(xz PROPERTIES
+ LINK_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/common/common_w32res.rc"
+ )
+ endif()
+
tuklib_progname(xz)
tuklib_mbstr(xz)