1 # the name of the target operating system
2 SET(CMAKE_SYSTEM_NAME Windows)
4 # which compilers to use for C and C++
5 SET(CMAKE_SYSTEM_NAME Windows)
6 SET(CMAKE_C_COMPILER clang)
7 SET(CMAKE_CXX_COMPILER clang++)
8 SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
9 SET(CMAKE_AR llvm-ar-3.9)
10 SET(CMAKE_LD llvm-link-3.9)
11 SET(CMAKE_LINKSE /usr/bin/i686-w64-mingw32-ld)
12 SET(CMAKE_NM llvm-nm-3.9)
14 set(CMAKE_CXX_FLAGS "-target i686-w64-mingw32")
15 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdinc -nostdinc++")
16 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem /usr/lib/clang/3.9.0/include")
17 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem /usr/i686-w64-mingw32/include/../../../usr/lib/gcc/i686-w64-mingw32/6.1-win32/include/c++")
18 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem /usr/i686-w64-mingw32/include/../../../usr/lib/gcc/i686-w64-mingw32/6.1-win32/include/c++/i686-w64-mingw32")
19 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem /usr/i686-w64-mingw32/include")
21 set(CMAKE_EXE_LINKER_FLAGS "-L/usr/lib/gcc/i686-w64-mingw32/6.1-win32 -target i686-w64-mingw32 ")
22 #set(CMAKE_EXE_LINKER_FLAGS "")
24 set(LIBAV_ROOT_DIR "/usr/local/i586-mingw-msvc/ffmpeg-3.1.1")
27 # here is the target environment located
30 SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32
31 /usr/local/i586-mingw-msvc
32 /usr/local/i586-mingw-msvc/SDL2/i686-w64-mingw32
33 /usr/local/i586-mingw-msvc/5.7/mingw_611
36 SET(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32
37 /usr/local/i586-mingw-msvc
38 /usr/local/i586-mingw-msvc/SDL1/
39 /usr/local/i586-mingw-msvc/5.7/mingw_611
42 SET(CSP_CROSS_BUILD 1)
44 # adjust the default behaviour of the FIND_XXX() commands:
45 # search headers and libraries in the target environment, search
46 # programs in the host environment
47 set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
48 set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
49 set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
51 #set(LIBAV_INCLUDE_DIRS /usr/local/i586-mingw-msvc/ffmpeg-3.0/include)
54 /usr/local/i586-mingw-msvc/SDL/i686-w64-mingw32/lib/libSDL2.dll.a
55 /usr/local/i586-mingw-msvc/SDL/i686-w64-mingw32/lib/libSDL2main.a)
56 set(SDL2_INCLUDE_DIRS /usr/local/i586-mingw-msvc/SDL/i686-w64-mingw32/include/SDL2)
59 /usr/local/i586-mingw-msvc/SDL1/lib/libSDL.dll.a
60 /usr/local/i586-mingw-msvc/SDL1/lib/libSDLmain.a)
61 set(SDL_INCLUDE_DIRS /usr/local/i586-mingw-msvc/SDL1/include/SDL)
63 set(SDLMAIN_LIBRARY "")
65 set(ADDITIONAL_LIBRARIES libwinmm.a)