Skip to content

Commit 48074eb

Browse files
authored
Fix build issues on Codespaces.
1 parent d782ce4 commit 48074eb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,18 @@ IF(${OPERATING_SYSTEM} MATCHES "Android")
5959
SET(LINUX CACHE INTERNAL "Is Linux or Android" 1)
6060
ENDIF()
6161

62-
IF(WIN32)
62+
IF(CMAKE_SYSTEM_NAME STREQUAL "Windows")
6363
ADD_COMPILE_DEFINITIONS(WINDOWS NOMINMAX) # Do not add min() and max() macros.
6464
IF(MSVC) # MSVC Has no UTF-8 support by default
6565
ADD_COMPILE_OPTIONS(/utf-8)
6666
ENDIF()
6767
SET(WINDOWS TRUE)
68-
ELSEIF(APPLE)
68+
ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
6969
ADD_COMPILE_DEFINITIONS(MACOSX)
70-
ELSEIF(LINUX)
70+
ELSEIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
7171
ADD_COMPILE_DEFINITIONS(LINUX)
7272
ELSE()
73-
MESSAGE(ERROR "Platform not defined")
73+
MESSAGE(WARNING "Platform not defined")
7474
ENDIF()
7575

7676
IF(CMAKE_BUILD_TYPE STREQUAL "Debug")

0 commit comments

Comments
 (0)