diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-08-30 16:24:18 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-08-30 18:22:56 +0200 |
commit | cf077427127a1647d6a11037a67f263be2558446 (patch) | |
tree | e4a1ff25ec8f61601b5be591d7058eaa07bdfce2 /userconfig-sthalik@Windows-MSVC.cmake | |
parent | ff36ab9c2ea2d72678afb75bf5ea3a7b33939b08 (diff) |
cmake: some fixes
Diffstat (limited to 'userconfig-sthalik@Windows-MSVC.cmake')
-rw-r--r-- | userconfig-sthalik@Windows-MSVC.cmake | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/userconfig-sthalik@Windows-MSVC.cmake b/userconfig-sthalik@Windows-MSVC.cmake index d7777ad9..87cc7184 100644 --- a/userconfig-sthalik@Windows-MSVC.cmake +++ b/userconfig-sthalik@Windows-MSVC.cmake @@ -2,8 +2,19 @@ set(CMAKE_C_COMPILER_INIT cl.exe) set(CMAKE_CXX_COMPILER_INIT cl.exe) set(CMAKE_ASM_NASM_COMPILER nasm.exe) +string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE) +set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING "" FORCE) + 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) + +if(NOT DEFINED OpenCV_DIR) + if(CMAKE_BUILD_TYPE STREQUAL "DEBUG") + #set(OpenCV_DIR "F:/dev/opentrack-depends/opencv/build-msvc64-debug/install" CACHE PATH "" FORCE) + sets(PATH OpenCV_DIR "") + else() + set(OpenCV_DIR "F:/dev/opentrack-depends/opencv/build-amd64/install" CACHE PATH "" FORCE) + endif() +endif() list(APPEND CMAKE_IGNORE_PATH "c:/msys64") list(APPEND CMAKE_IGNORE_PREFIX_PATH "c:/msys64") @@ -15,6 +26,10 @@ sets(BOOL FLOORMAT_SUBMODULE-SDL2 ON) add_link_options(-STACK:41943040) add_link_options(-WX:NO) +if(FLOORMAT_ASAN) + add_compile_options(-fsanitize-address-use-after-return -fsanitize=address) +endif() + if(CMAKE_SIZEOF_VOID_P GREATER 4) set(CMAKE_C_COMPILER_LAUNCHER msvc64.cmd) set(CMAKE_CXX_COMPILER_LAUNCHER msvc64.cmd) @@ -37,6 +52,7 @@ function(fm-userconfig-external) SDL_STATIC OFF SDL_SHARED ON SDL_FORCE_STATIC_VCRT OFF + SDL_LIBC ON CORRADE_BUILD_STATIC OFF CORRADE_PLUGINMANAGER_NO_DYNAMIC_PLUGIN_SUPPORT OFF MAGNUM_BUILD_STATIC OFF |