summaryrefslogtreecommitdiffhomepage
path: root/userconfig-sthalik@Windows-MSVC.cmake
blob: 4f2b23d30c111d9a6c65a3ad390657ad2df010c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
set(CMAKE_C_COMPILER_INIT cl.exe)
set(CMAKE_CXX_COMPILER_INIT cl.exe)
set(CMAKE_ASM_NASM_COMPILER nasm.exe)

set(CMAKE_TOOLCHAIN_FILE "${CMAKE_SOURCE_DIR}/cmake/msvc.cmake" CACHE FILEPATH "" FORCE)
set(OpenCV_DIR "F:/dev/opentrack-depends/opencv/build-amd64/install" CACHE PATH "" FORCE)

list(APPEND CMAKE_IGNORE_PATH "c:/msys64")
list(APPEND CMAKE_IGNORE_PREFIX_PATH "c:/msys64")
set(CMAKE_INSTALL_MESSAGE NEVER)

if(CMAKE_BUILD_TYPE STREQUAL "DEBUG")
    sets(BOOL
         FLOORMAT_PRECOMPILED-HEADERS                       OFF
         SDL_STATIC                                         OFF
         SDL_SHARED                                         ON
         CORRADE_BUILD_STATIC                               OFF
         CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT    OFF
         MAGNUM_BUILD_STATIC                                OFF
         MAGNUM_BUILD_PLUGINS_STATIC                        OFF
    )
else()
    sets(BOOL
         FLOORMAT_PRECOMPILED-HEADERS                       OFF
         SDL_STATIC                                         ON
         SDL_SHARED                                         OFF
         CORRADE_BUILD_STATIC                               ON
         CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT    ON
         MAGNUM_BUILD_STATIC                                ON
         MAGNUM_BUILD_PLUGINS_STATIC                        ON
    )
endif()

function(fm-userconfig-src)
    add_compile_options(-W4 -Qvec-report:1)
    if(MSVC_VERSION GREATER_EQUAL 1935) # 17.5 Preview
        add_compile_options(-Zc:checkGwOdr)
    endif()
endfunction()