Skip to content

Commit f003045

Browse files
committed
work with list var for pkcfongi and join at the end
1 parent bfaa679 commit f003045

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,15 @@ if(QUAZIP_QT_MAJOR_VERSION EQUAL 6)
8282
set(QUAZIP_QT_ZLIB_HEADER_COMPONENT ZlibPrivate)
8383
set(QUAZIP_LIB_LIBRARIES Qt6::Core )
8484
set(QUAZIP_TEST_QT_LIBRARIES Qt6::Core Qt6::Network Qt6::Test)
85-
set(QUAZIP_PKGCONFIG_REQUIRES "zlib, Qt6Core")
85+
set(QUAZIP_PKGCONFIG_REQUIRES_LIST zlib Qt6Core)
8686
elseif(QUAZIP_QT_MAJOR_VERSION EQUAL 5)
8787
find_package(Qt5 REQUIRED COMPONENTS Core
8888
OPTIONAL_COMPONENTS Network Test)
8989
message(STATUS "Found Qt version ${Qt5_VERSION} at ${Qt5_DIR}")
9090
set(QUAZIP_QT_ZLIB_COMPONENT Zlib)
9191
set(QUAZIP_LIB_LIBRARIES Qt5::Core)
9292
set(QUAZIP_TEST_QT_LIBRARIES Qt5::Core Qt5::Network Qt5::Test)
93-
set(QUAZIP_PKGCONFIG_REQUIRES "zlib, Qt5Core")
93+
set(QUAZIP_PKGCONFIG_REQUIRES_LIST zlib Qt5Core)
9494
else()
9595
message(FATAL_ERROR "Qt version ${QUAZIP_QT_MAJOR_VERSION} is not supported")
9696
endif()
@@ -253,7 +253,7 @@ if(QUAZIP_ENABLE_QTEXTCODEC)
253253
if(Qt6Core5Compat_FOUND)
254254
set(QUAZIP_LIB_LIBRARIES ${QUAZIP_LIB_LIBRARIES} Qt6::Core5Compat)
255255
set(QUAZIP_TEST_QT_LIBRARIES ${QUAZIP_TEST_QT_LIBRARIES} Qt6::Core5Compat)
256-
string(APPEND QUAZIP_PKGCONFIG_REQUIRES ", Qt6Core5Compat")
256+
list(APPEND QUAZIP_PKGCONFIG_REQUIRES_LIST Qt6Core5Compat)
257257

258258
set(QUAZIP_CAN_USE_QTEXTCODEC TRUE)
259259
message("-- Quazip can use QTextCodec")
@@ -273,6 +273,7 @@ endif()
273273

274274
configure_file(quazip/quazip_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/quazip/quazip_config.h)
275275

276+
list(JOIN QUAZIP_PKGCONFIG_REQUIRES_LIST ", " QUAZIP_PKGCONFIG_REQUIRES)
276277
add_subdirectory(quazip)
277278

278279
if(QUAZIP_ENABLE_TESTS)

0 commit comments

Comments
 (0)