From bfa393497f2d529b71cc3f99a9fea82f2f2e646b Mon Sep 17 00:00:00 2001 From: Vladimir Menshakov Date: Thu, 15 Feb 2018 20:08:25 +0000 Subject: [PATCH] Removed SDL2MAIN_LIBRARY from the list of requred vars for UNIX platforms only --- cmake/FindSDL2.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/FindSDL2.cmake b/cmake/FindSDL2.cmake index aaa1c91..4d00dfd 100644 --- a/cmake/FindSDL2.cmake +++ b/cmake/FindSDL2.cmake @@ -13,6 +13,10 @@ FIND_LIBRARY(SDL2MAIN_LIBRARY NAMES SDL2main) INCLUDE(FindPackageHandleStandardArgs) -FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2 REQUIRED_VARS SDL2_LIBRARY SDL2_INCLUDE_DIR) +IF (UNIX) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2 REQUIRED_VARS SDL2_LIBRARY SDL2_INCLUDE_DIR) +ELSE (UNIX) + FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2 REQUIRED_VARS SDL2_LIBRARY SDL2MAIN_LIBRARY SDL2_INCLUDE_DIR) +ENDIF (UNIX) MARK_AS_ADVANCED(SDL2_INCLUDE_DIR SDL2_LIBRARY SDL2MAIN_LIBRARY)