359e2ff84f
It uses visual studio dependencies
21 lines
959 B
CMake
21 lines
959 B
CMake
# Usage:
|
|
# cmake .. -DLLVM_PREFIX=/path/to/llvm-mingw-prefix -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchain-llvm-mingw-64bit.cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo
|
|
|
|
# the name of the target operating system
|
|
SET(CMAKE_SYSTEM_NAME Windows)
|
|
|
|
# which compilers to use for C and C++
|
|
SET(CMAKE_C_COMPILER ${LLVM_PREFIX}/bin/x86_64-w64-mingw32-clang)
|
|
SET(CMAKE_CXX_COMPILER ${LLVM_PREFIX}/bin/x86_64-w64-mingw32-clang++)
|
|
SET(CMAKE_RC_COMPILER ${LLVM_PREFIX}/bin/x86_64-w64-mingw32-windres)
|
|
|
|
# here is the target environment located
|
|
SET(CMAKE_FIND_ROOT_PATH ${LLVM_PREFIX}/generic-w64-mingw32 ${LLVM_PREFIX}/x86_64-w64-mingw32/bin ${PROJECT_SOURCE_DIR}/dependencies-vs-64bit)
|
|
|
|
# adjust the default behaviour of the FIND_XXX() commands:
|
|
# search headers and libraries in the target environment, search
|
|
# programs in the host environment
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ALWAYS)
|
|
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|