git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 0/2] Add pcre2 support for cmake build system.

From
Yuyi Wang via GitGitGadget <gitgitgadget@gmail.com>
Date
May 24, 2022, 06:38 UTC
Message-ID
<pull.1267.v2.git.git.1653374328.gitgitgadget@gmail.com>
In-Reply-To
<pull.1267.git.git.1652846305514.gitgitgadget@gmail.com>
Pcre2 is dealt with pkg-config.
Yuyi Wang (2):
  Fix CMakeLists.txt on Linux.
  Add pcre2 support for cmake build system.
 contrib/buildsystems/CMakeLists.txt | 20 +++++++++++++++++---
 1 file changed, 17 insertions(+), 3 deletions(-)
base-commit: 277cf0bc36094f6dc4297d8c9cef79df045b735d
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1267%2FBerrysoft%2Fcmake%2Fpcre2-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-git-1267/Berrysoft/cmake/pcre2-v2
Pull-Request: https://github.com/git/git/pull/1267
Range-diff vs v1:
 -:  ----------- > 1:  29cb31e5c50 Fix CMakeLists.txt on Linux.
 1:  679e5dd46d0 ! 2:  b828585b205 Add pcre2 support for cmake build system.
     @@ Commit message
      
          This commit fixes one of the TODOs listed in the CMakeLists.txt.
      
     -    There's also some small fix to ensure it builds successfully.
     +    As pcre2 doesn't provide cmake find module, we find it with pkgconf.
     +    This patch also works with vcpkg on Windows, with pkgconf and pcre2
     +    installed.
     +
     +    Pkgconf and pcre2 is detected automatically just like curl, expat
     +    and iconv. The output of CMake indicates whether pcre2 is found.
      
          Signed-off-by: Yuyi Wang <Strawberry_Str@hotmail.com>
      
       ## contrib/buildsystems/CMakeLists.txt ##
     -@@ contrib/buildsystems/CMakeLists.txt: set(CMAKE_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/../..)
     - 
     - option(USE_VCPKG "Whether or not to use vcpkg for obtaining dependencies.  Only applicable to Windows platforms" ON)
     - if(NOT WIN32)
     --	set(USE_VCPKG OFF CACHE BOOL FORCE)
     -+	set(USE_VCPKG OFF CACHE BOOL "" FORCE)
     - endif()
     - 
     - if(NOT DEFINED CMAKE_EXPORT_COMPILE_COMMANDS)
      @@ contrib/buildsystems/CMakeLists.txt: project(git
       
       #TODO gitk git-gui gitweb
     @@ contrib/buildsystems/CMakeLists.txt: endif()
       
       
       if(WIN32 AND NOT MSVC)#not required for visual studio builds
     -@@ contrib/buildsystems/CMakeLists.txt: if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
     - 
     - elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux")
     - 	add_compile_definitions(PROCFS_EXECUTABLE_PATH="/proc/self/exe" HAVE_DEV_TTY )
     --	list(APPEND compat_SOURCES unix-socket.c unix-stream-server.c)
     -+	list(APPEND compat_SOURCES unix-socket.c unix-stream-server.c compat/linux/procinfo.c)
     - endif()
     - 
     - if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
      @@ contrib/buildsystems/CMakeLists.txt: endif()
       if(Iconv_FOUND)
       	target_link_libraries(common-main ${Iconv_LIBRARIES})
       endif()
      +if(PCRE2_FOUND)
      +	target_link_libraries(common-main ${PCRE2_LIBRARIES})
     ++	target_link_directories(common-main PUBLIC ${PCRE2_LIBRARY_DIRS})
      +endif()
       if(WIN32)
       	target_link_libraries(common-main ws2_32 ntdll ${CMAKE_BINARY_DIR}/git.res)
-- 
gitgitgadget
Previous: Derrick StoleeNext: Yuyi Wang via GitGitGadget
Message 6 of 9 in “Add pcre2 support for cmake build system.”
  1. Add pcre2 support for cmake build system.Yuyi Wang via GitGitGadget, May 18, 2022
  2. Junio C HamanoMay 18, 2022
  3. Yuyi WangMay 19, 2022
  4. Derrick StoleeMay 23, 2022
  5. Derrick StoleeMay 23, 2022
  6. 0/2 Add pcre2 support for cmake build system.Yuyi Wang via GitGitGadget, May 24, 2022
  7. 1/2 Fix CMakeLists.txt on Linux.Yuyi Wang via GitGitGadget, May 24, 2022
  8. Junio C HamanoMay 24, 2022
  9. 2/2 Add pcre2 support for cmake build system.Yuyi Wang via GitGitGadget, May 24, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.