From 7dd5c7abfc0b0ee7de3620ad3739bbffa4018d41 Mon Sep 17 00:00:00 2001 From: Antonio Maiorano Date: Tue, 22 May 2018 23:55:25 -0400 Subject: [PATCH] Fix build of sdl2-net for linux --- ports/sdl2-net/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ports/sdl2-net/CMakeLists.txt b/ports/sdl2-net/CMakeLists.txt index aea5f005e4..5ee86e9bdf 100644 --- a/ports/sdl2-net/CMakeLists.txt +++ b/ports/sdl2-net/CMakeLists.txt @@ -1,7 +1,9 @@ cmake_minimum_required(VERSION 3.0) project(SDL2_NET C) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4244 /wd4996") +if (MSVC) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4244 /wd4996") +endif() find_path(SDL_INCLUDE_DIR SDL2/SDL.h) find_library(SDL_LIBRARY NAMES SDL2d SDL2)