Skip to content

Commit 339dca3

Browse files
committed
Correction for non-Windows platforms
1 parent 0d487fa commit 339dca3

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

CMakeLists.txt

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
4848
# This allows to not sign compiled PCRE2 executables for iOS / macOS builds,
4949
# we don't really use them anyway, but we need them build for the install
5050
# command below to work.
51-
set(EXTRA_INSTALL_ARGS "-- CODE_SIGNING_ALLOWED=NO")
51+
set(EXTRA_INSTALL_ARGS "--;CODE_SIGNING_ALLOWED=NO")
5252

5353
elseif(CMAKE_SYSTEM_NAME MATCHES "iOS")
5454
set(
@@ -62,7 +62,7 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "iOS")
6262
# This allows to not sign compiled PCRE2 executables for iOS / macOS builds,
6363
# we don't really use them anyway, but we need them build for the install
6464
# command below to work.
65-
set(EXTRA_INSTALL_ARGS "-- CODE_SIGNING_ALLOWED=NO")
65+
set(EXTRA_INSTALL_ARGS "--;CODE_SIGNING_ALLOWED=NO")
6666
endif()
6767

6868
if(CMAKE_SYSTEM_NAME MATCHES "Android|Windows")
@@ -103,14 +103,15 @@ endif()
103103
# Above we have build & installed a local version of PCRE2 library, now we want
104104
# to enforce Lighttpd build to see and use it (rather than any system-wide
105105
# installation of another PCRE2 version). On Ubuntu / macOS it can be done
106-
# by setting
107-
#
108-
# set(CMAKE_PREFIX_PATH "${CMAKE_BINARY_DIR}/sysroot")
109-
#
110-
# however when building for Windows inside Msys2 / UCRT64 this just has
111-
# no effect for reasons beyond my understanding. Setting PKG_CONFIG_PATH
112-
# environment variable to the folder with PCRE2 .pc file works though.
113-
set(ENV{PKG_CONFIG_PATH} "${CMAKE_BINARY_DIR}/sysroot/lib/pkgconfig")
106+
# by setting CMAKE_PREFIX_PATH; somehow it has no effect in Msys2 / UCRT64
107+
# builds for Windows (beyond by current understanding), but there setting
108+
# the PKG_CONFIG_PATH environment variable, which is picked up by pkg-config
109+
# does the trick.
110+
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
111+
set(ENV{PKG_CONFIG_PATH} "${CMAKE_BINARY_DIR}/sysroot/lib/pkgconfig")
112+
else()
113+
set(CMAKE_PREFIX_PATH "${CMAKE_BINARY_DIR}/sysroot")
114+
endif()
114115

115116
add_subdirectory(lighttpd1.4)
116117

0 commit comments

Comments
 (0)