From 587933d4d3db0e8e1b6249646f95074c46a14e79 Mon Sep 17 00:00:00 2001 From: LeandroSQ Date: Tue, 30 Jan 2024 03:32:19 -0300 Subject: [PATCH] Another test --- CMakeLists.txt | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f2f6de..cef862b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.18.0) set(PROJECT_NAME sandbox) function(dump_info) + message(STATUS "CMAKE_SYSTEM: ${CMAKE_SYSTEM}") message(STATUS "CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}") message(STATUS "CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}") message(STATUS "CMAKE_C_COMPILER_ID: ${CMAKE_C_COMPILER_ID}") @@ -9,8 +10,16 @@ function(dump_info) message(STATUS "CMAKE_C_COMPILER_VERSION: ${CMAKE_C_COMPILER_VERSION}") message(STATUS "CMAKE_CXX_COMPILER_VERSION: ${CMAKE_CXX_COMPILER_VERSION}") - if(UNIX AND NOT APPLE) - set(LINUX ON) + if((UNIX AND NOT APPLE) OR ${CMAKE_SYSTEM_NAME} STREQUAL "Linux" OR CMAKE_SYSTEM MATCHES "Linux") + set(LINUX TRUE) + endif() + + if(NOT WIN32 AND (MSVC OR MSYS OR MINGW) OR ${CMAKE_SYSTEM_NAME} STREQUAL "Windows" OR CMAKE_SYSTEM MATCHES "Windows") + set(WIN32 TRUE) + endif() + + if(NOT APPLE AND (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" OR CMAKE_SYSTEM MATCHES "Darwin")) + set(APPLE TRUE) endif() if(WIN32)