Skip to content

Commit cbc0ada

Browse files
committed
CMake: Hide pledge() support behind an OpenBSD check
1 parent 4015177 commit cbc0ada

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ if(NOT LIBMGBA_ONLY)
3131
set(USE_EDITLINE ON CACHE BOOL "Whether or not to enable the CLI-mode debugger")
3232
endif()
3333
set(USE_GDB_STUB ON CACHE BOOL "Whether or not to enable the GDB stub ARM debugger")
34-
set(USE_PLEDGE OFF CACHE BOOL "Whether or not to drop privileges with pledge")
34+
if (CMAKE_SYSTEM_NAME STREQUAL OpenBSD)
35+
set(USE_PLEDGE ON CACHE BOOL "Whether or not to drop privileges with pledge")
36+
endif()
3537
set(USE_FFMPEG ON CACHE BOOL "Whether or not to enable FFmpeg support")
3638
set(USE_ZLIB ON CACHE BOOL "Whether or not to enable zlib support")
3739
set(USE_MINIZIP ON CACHE BOOL "Whether or not to enable external minizip support")
@@ -1230,7 +1232,9 @@ if(NOT QUIET AND NOT LIBMGBA_ONLY)
12301232
message(STATUS " CLI debugger: ${USE_EDITLINE}")
12311233
endif()
12321234
message(STATUS " GDB stub: ${USE_GDB_STUB}")
1233-
message(STATUS " pledge: ${USE_PLEDGE}")
1235+
if(CMAKE_SYSTEM_NAME STREQUAL OpenBSD)
1236+
message(STATUS " pledge: ${USE_PLEDGE}")
1237+
endif()
12341238
message(STATUS " GIF/Video recording: ${USE_FFMPEG}")
12351239
message(STATUS " Screenshot/advanced savestate support: ${USE_PNG}")
12361240
message(STATUS " ZIP support: ${SUMMARY_ZIP}")

0 commit comments

Comments
 (0)