Skip to content

Commit 531686d

Browse files
committed
Fix meson prefix config on Windows
1 parent 5d9e9bc commit 531686d

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

meson.build

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,17 @@ project(
66
default_options : [
77
# warning_level=3 uses -Wpedantic that doesn't play nice with cython-generated code
88
'warning_level=2',
9-
# Overwrite default prefix (e.g. /usr/local on linux), note installing is
10-
# always done with a --destdir given installing this project globally on
11-
# the system is meaningless
12-
'prefix=/',
9+
# We always install with a `--destdir` parameter given installing this
10+
# project globally on the system is meaningless.
11+
#
12+
# However the prefix (e.g. `/usr/local` by default on linux) is always appended
13+
# to the `--destdir` parameter, hence why we need to overwrite it.
14+
#
15+
# Aaaand of course Windows requires special care :'(
16+
# see: https://github.com/conan-io/conan/pull/17206
17+
'prefix=@0@'.format(
18+
host_machine.system() == 'windows' ? 'C:/' : '/'
19+
),
1320
'c_std=c17',
1421
]
1522
)

0 commit comments

Comments
 (0)