Skip to content

Commit 3c3b435

Browse files
committed
Change zlib_crcvx->zlib_s390x_functable dependency
The zlib_crcvx target depends on the zlib_s390x_functable target. To minimize the impact on the main CMakeLists.txt file, change its dependency to public and directly link the objects. This way there will be no doubled symbols if other targets also depend on zlib_s390x_functable.
1 parent 7ccadea commit 3c3b435

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,6 @@ if(ZLIB_BUILD_SHARED)
205205
UNIX
206206
AND NOT APPLE
207207
AND NOT (CMAKE_SYSTEM_NAME STREQUAL AIX))
208-
target_link_libraries(zlib PRIVATE $<TARGET_NAME_IF_EXISTS:zlib_s390x_functable>)
209208
target_link_libraries(zlib PRIVATE $<TARGET_NAME_IF_EXISTS:zlib_crc32_vx>)
210209
endif(ZLIB_BUILD_SHARED)
211210

@@ -229,7 +228,6 @@ if(ZLIB_BUILD_STATIC)
229228
set_target_properties(
230229
zlibstatic PROPERTIES EXPORT_NAME ZLIBSTATIC OUTPUT_NAME
231230
z${zlib_static_suffix})
232-
target_link_libraries(zlibstatic PRIVATE $<TARGET_NAME_IF_EXISTS:zlib_s390x_functable>)
233231
target_link_libraries(zlibstatic PRIVATE $<TARGET_NAME_IF_EXISTS:zlib_crc32_vx>)
234232
endif(ZLIB_BUILD_STATIC)
235233

contrib/s390x/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ if(ZLIB_CRC32VX AND HAS_S390X_SUPPORT)
5858
add_library(zlib_crc32_vx OBJECT
5959
crc32-vx.c
6060
../functable/functable.h)
61-
target_link_libraries(zlib_crc32_vx PRIVATE zlib_s390x_functable)
61+
target_link_libraries(zlib_crc32_vx PUBLIC $<TARGET_OBJECTS:zlib_s390x_functable>)
6262
set_source_files_properties(
6363
crc32-vx.c
6464
PROPERTIES COMPILE_OPTIONS "${VGFMAFLAG}")

0 commit comments

Comments
 (0)