123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- set(CMAKE_SYSTEM_NAME Windows)
- set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static-libgcc")
- if(EXISTS /usr/i686-w64-mingw32)
- set(CMAKE_STRIP i686-w64-mingw32-strip)
- set(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
- set(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
- set(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
- set(CMAKE_AR:FILEPATH /usr/bin/i686-w64-mingw32-ar)
- set(CMAKE_FIND_ROOT_PATH /usr/i686-w64-mingw32)
- elseif(EXISTS /usr/i586-mingw32msvc)
- set(CMAKE_STRIP i586-mingw32msvc-strip)
- set(CMAKE_C_COMPILER i586-mingw32msvc-gcc)
- set(CMAKE_CXX_COMPILER i586-mingw32msvc-g++)
- set(CMAKE_RC_COMPILER i586-mingw32msvc-windres)
- set(CMAKE_FIND_ROOT_PATH /usr/i586-mingw32msvc)
- elseif(EXISTS /opt/mingw)
- set(CMAKE_STRIP /opt/mingw/usr/bin/i686-pc-mingw32-strip)
- set(CMAKE_C_COMPILER /opt/mingw/usr/bin/i686-pc-mingw32-gcc)
- set(CMAKE_CXX_COMPILER /opt/mingw/usr/bin/i686-pc-mingw32-g++)
- set(CMAKE_RC_COMPILER /opt/mingw/usr/bin/i686-pc-mingw32-windres)
- set(CMAKE_FIND_ROOT_PATH /opt/mingw/usr/i686-pc-mingw32)
- else()
- set(CMAKE_STRIP /usr/local/cross-tools/bin/i386-mingw32-strip)
- set(CMAKE_C_COMPILER /usr/local/cross-tools/bin/i386-mingw32-gcc)
- set(CMAKE_CXX_COMPILER /usr/local/cross-tools/bin/i386-mingw32-g++)
- set(CMAKE_RC_COMPILER /usr/local/cross-tools/bin/i386-mingw32-windres)
- set(CMAKE_FIND_ROOT_PATH /usr/local/cross-tools)
- endif()
- set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
- set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
- set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
- set(ENV{PKG_CONFIG_LIBDIR} ${CMAKE_FIND_ROOT_PATH}/lib/pkgconfig)
- set(ENV{PKG_CONFIG_PATH} ${CMAKE_FIND_ROOT_PATH}/lib/pkgconfig)
- set(ENV{MINGDIR} ${CMAKE_FIND_ROOT_PATH})
|