File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ if(NOT Yaml_FOUND)
21
21
target_compile_options (yaml PRIVATE -Wno-int-to-pointer-cast )
22
22
endif ()
23
23
24
- if (LINUX )
24
+ if (SOURCEMETA_OS_LINUX )
25
+ message (STATUS "Compiling libyaml with _GNU_SOURCE" )
25
26
# See https://github.com/3DSGuy/Project_CTR/issues/122
26
27
target_compile_definitions (yaml PRIVATE _GNU_SOURCE )
27
28
endif ()
Original file line number Diff line number Diff line change @@ -10,3 +10,14 @@ elseif(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
10
10
elseif (MSVC )
11
11
set (SOURCEMETA_COMPILER_MSVC ON )
12
12
endif ()
13
+
14
+ if (CMAKE_SYSTEM_NAME STREQUAL "Darwin" )
15
+ set (SOURCEMETA_OS_MACOS ON )
16
+ # It seems that in some cases, `LINUX` is not set on GNU/Linux on WSL
17
+ elseif (LINUX OR CMAKE_SYSTEM_NAME STREQUAL "Linux" )
18
+ set (SOURCEMETA_OS_LINUX ON )
19
+ elseif (WIN32 )
20
+ set (SOURCEMETA_OS_WINDOWS ON )
21
+ elseif (${CMAKE_SYSTEM_NAME} MATCHES ".*BSD" )
22
+ set (SOURCEMETA_OS_BSD ON )
23
+ endif ()
You can’t perform that action at this time.
0 commit comments