From 2998dc09288f009e162a0573edd703628f939488 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Thu, 10 Aug 2017 16:15:17 +0200 Subject: cmake: fix installed qt dlls location --- cmake/opentrack-platform.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'cmake/opentrack-platform.cmake') diff --git a/cmake/opentrack-platform.cmake b/cmake/opentrack-platform.cmake index 7e140e98..7882196e 100644 --- a/cmake/opentrack-platform.cmake +++ b/cmake/opentrack-platform.cmake @@ -25,7 +25,9 @@ if(NOT CMAKE_INSTALL_PREFIX) set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install") endif() -set(CMAKE_BUILD_TYPE_INIT "RELEASE") +if(NOT CMAKE_BUILD_TYPE) + set(CMAKE_BUILD_TYPE "RELEASE" CACHE STRING "" FORCE) +endif() if(APPLE) if(NOT CMAKE_OSX_ARCHITECTURES) @@ -60,9 +62,9 @@ if(MSVC) add_definitions(-DNOMINMAX -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS) add_definitions(-D_ITERATOR_DEBUG_LEVEL=0 -D_ITERATOR_DEBUG_LEVEL=0) add_definitions(-D_HAS_EXCEPTIONS=0) - if(MSVC_VERSION GREATER 1910) # 1911 is 15.3 update - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -permissive-") - set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -permissive-") + if(MSVC_VERSION GREATER 1909) # visual studio 2017 + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -permissive- -diagnostics:caret") + set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -permissive- -diagnostics:caret") endif() set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Zi -std:c++14") -- cgit v1.2.3