Skip to content

Commit 0888a2e

Browse files
robertodrilfreddy
authored andcommitted
Use PRIVATE ZLIB::ZLIB instead of ${ZLIB_LIBRARIES} everywhere
1 parent cfa578b commit 0888a2e

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

src/bin/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ link_directories(${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_LIBDIR})
88
add_executable(run_pcm run_pcm.cpp)
99
add_dependencies(run_pcm generate-config-hpp)
1010
if(STATIC_LIBRARY_ONLY)
11-
target_link_libraries(run_pcm pcm-static ${ZLIB_LIBRARIES})
11+
target_link_libraries(run_pcm pcm-static PRIVATE ZLIB::ZLIB)
1212
else()
1313
target_link_libraries(run_pcm pcm-shared)
1414
endif()

tests/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ if(BUILD_CUSTOM_BOOST)
2929
add_dependencies(unit_tests custom_boost)
3030
endif()
3131
if(STATIC_LIBRARY_ONLY)
32-
target_link_libraries(unit_tests pcm-static ${ZLIB_LIBRARIES})
32+
target_link_libraries(unit_tests pcm-static PRIVATE ZLIB::ZLIB)
3333
else()
3434
target_link_libraries(unit_tests pcm-shared)
3535
endif()

tests/C_host/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ link_directories(${PROJECT_BINARY_DIR}/lib)
22
add_executable(C_host C_host.c)
33
add_executable(fail-C_host fail-C_host.c)
44
if(STATIC_LIBRARY_ONLY)
5-
target_link_libraries(C_host pcm-static ${ZLIB_LIBRARIES})
6-
target_link_libraries(fail-C_host pcm-static ${ZLIB_LIBRARIES})
5+
target_link_libraries(C_host pcm-static PRIVATE ZLIB::ZLIB)
6+
target_link_libraries(fail-C_host pcm-static PRIVATE ZLIB::ZLIB)
77
else()
88
target_link_libraries(C_host pcm-shared)
99
target_link_libraries(fail-C_host pcm-shared)

tests/Fortran_host/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
link_directories(${PROJECT_BINARY_DIR}/lib)
22
add_executable(Fortran_host Fortran_host.f90 Fortran_host-modules.f90)
33
if(STATIC_LIBRARY_ONLY)
4-
target_link_libraries(Fortran_host pcm-static ${ZLIB_LIBRARIES})
4+
target_link_libraries(Fortran_host pcm-static PRIVATE ZLIB::ZLIB)
55
else()
66
target_link_libraries(Fortran_host pcm-shared)
77
endif()

tests/bi_operators/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if(BUILD_STANDALONE)
2525
add_dependencies(update_reference_files custom_boost)
2626
endif()
2727
if(STATIC_LIBRARY_ONLY)
28-
target_link_libraries(update_reference_files pcm-static ${ZLIB_LIBRARIES})
28+
target_link_libraries(update_reference_files pcm-static PRIVATE ZLIB::ZLIB)
2929
else()
3030
target_link_libraries(update_reference_files pcm-shared)
3131
endif()

0 commit comments

Comments
 (0)