mirror of https://git.tukaani.org/xz.git
CMake: Fix Windows resource file dependencies
If common_w32res.rc is modified, the resource files need to be rebuilt.
In contrast, the liblzma*.map files truly are link dependencies.
(cherry picked from commit da4f275bd1
)
This commit is contained in:
parent
af8533459c
commit
69637d0c32
|
@ -1265,8 +1265,8 @@ if(WIN32)
|
|||
# Add the Windows resource file for liblzma.dll.
|
||||
target_sources(liblzma PRIVATE src/liblzma/liblzma_w32res.rc)
|
||||
|
||||
set_target_properties(liblzma PROPERTIES
|
||||
LINK_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/common/common_w32res.rc"
|
||||
set_source_files_properties(src/liblzma/liblzma_w32res.rc PROPERTIES
|
||||
OBJECT_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/common/common_w32res.rc"
|
||||
)
|
||||
|
||||
# Export the public API symbols with __declspec(dllexport).
|
||||
|
@ -1629,8 +1629,9 @@ if(HAVE_DECODERS AND (NOT MSVC OR MSVC_VERSION GREATER_EQUAL 1900))
|
|||
if(WIN32)
|
||||
# Add the Windows resource file for xzdec.exe or lzmadec.exe.
|
||||
target_sources("${XZDEC}" PRIVATE "src/xzdec/${XZDEC}_w32res.rc")
|
||||
set_target_properties("${XZDEC}" PROPERTIES
|
||||
LINK_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/common/common_w32res.rc"
|
||||
set_source_files_properties(
|
||||
"src/xzdec/${XZDEC}_w32res.rc" PROPERTIES
|
||||
OBJECT_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/common/common_w32res.rc"
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@ -1685,8 +1686,8 @@ if(HAVE_DECODERS AND (NOT MSVC OR MSVC_VERSION GREATER_EQUAL 1900))
|
|||
if(WIN32)
|
||||
# Add the Windows resource file for lzmainfo.exe.
|
||||
target_sources(lzmainfo PRIVATE src/lzmainfo/lzmainfo_w32res.rc)
|
||||
set_target_properties(lzmainfo PROPERTIES
|
||||
LINK_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/common/common_w32res.rc"
|
||||
set_source_files_properties(src/lzmainfo/lzmainfo_w32res.rc PROPERTIES
|
||||
OBJECT_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/common/common_w32res.rc"
|
||||
)
|
||||
endif()
|
||||
|
||||
|
@ -1794,8 +1795,8 @@ if(NOT MSVC OR MSVC_VERSION GREATER_EQUAL 1900)
|
|||
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"
|
||||
set_source_files_properties(src/xz/xz_w32res.rc PROPERTIES
|
||||
OBJECT_DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/src/common/common_w32res.rc"
|
||||
)
|
||||
endif()
|
||||
|
||||
|
|
Loading…
Reference in New Issue