From 271290c308e7feccd05ce6d3f1bfa5f9db33a76f Mon Sep 17 00:00:00 2001 From: Balletie Date: Sun, 24 Aug 2014 16:40:57 +0200 Subject: [PATCH] Make toolchain compatible for both OSX and Linux --- CMakeLists_mingw.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists_mingw.txt b/CMakeLists_mingw.txt index 5808593b04..f3df7c65fe 100644 --- a/CMakeLists_mingw.txt +++ b/CMakeLists_mingw.txt @@ -18,8 +18,14 @@ INCLUDE(FindPkgConfig) PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2) INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIRS}) +if(APPLE) + SET(TARGET_ENVIRONMENT /usr/local/mingw-w32-bin_i686-darwin/i686-w64-mingw32) +else() + SET(TARGET_ENVIRONMENT /usr/i686-w64-mingw32) +endif(APPLE) + # here is the target environment located -SET(CMAKE_FIND_ROOT_PATH /usr/local/mingw-w32-bin_i686-darwin/i686-w64-mingw32) +SET(CMAKE_FIND_ROOT_PATH ${TARGET_ENVIRONMENT}) # adjust the default behaviour of the FIND_XXX() commands: # search headers and libraries in the target environment, search