
This commit makes common external packages always be included through find_package to eliminate differences in variables set, wraps find_package for vendored libraries on Windows to factor out common code, and removes miscellaneous useless code elsewhere in dependency handling. This also fixes a problem where pkg-config would pick up `build` libraries instead of `host` when cross-compiling.
16 lines
411 B
CMake
16 lines
411 B
CMake
set(CMAKE_SYSTEM_NAME Windows)
|
|
|
|
set(TRIPLE i686-w64-mingw32)
|
|
|
|
set(CMAKE_C_COMPILER ${TRIPLE}-gcc)
|
|
set(CMAKE_CXX_COMPILER ${TRIPLE}-g++)
|
|
set(CMAKE_RC_COMPILER ${TRIPLE}-windres)
|
|
|
|
set(CMAKE_FIND_ROOT_PATH /usr/${TRIPLE})
|
|
|
|
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} /usr/${TRIPLE}/lib/pkgconfig)
|