]> git.ipfire.org Git - thirdparty/zlib-ng.git/commitdiff
CMake: Replace ';' by '$<SEMICOLON>' in generator-expression
authorDeniz Bahadir <deniz@code.bahadir.email>
Fri, 5 Apr 2024 20:37:11 +0000 (22:37 +0200)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Thu, 11 Apr 2024 10:44:15 +0000 (12:44 +0200)
Note: CMake generator-expressions should not contain semicolons,
especially if they might end up in a CMake list, because a semicolon
would be interpreted as list-item separator and therefore render the
generator-expression invalid. The generator-expression `$<SEMICOLON>`
should be used instead.

Signed-off-by: Deniz Bahadir <deniz@code.bahadir.email>
CMakeLists.txt

index 56654bf00d758e06c7d04a78a06fdc9654bb2074..dda0f7b4ffffc37b2ddc67536044709ab1a52a09 100644 (file)
@@ -1170,7 +1170,7 @@ foreach(ZLIB_INSTALL_LIBRARY ${ZLIB_INSTALL_LIBRARIES})
         target_compile_definitions(${ZLIB_INSTALL_LIBRARY} PUBLIC ZLIBNG_NATIVE_API)
     endif()
     target_include_directories(${ZLIB_INSTALL_LIBRARY} PUBLIC
-        "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR};${CMAKE_CURRENT_SOURCE_DIR}>"
+        "$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}$<SEMICOLON>${CMAKE_CURRENT_SOURCE_DIR}>"
         "$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")
 endforeach()