summaryrefslogtreecommitdiffhomepage
path: root/cmake
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2017-08-14 21:13:51 +0200
committerStanislaw Halik <sthalik@misaki.pl>2017-08-14 21:13:51 +0200
commitc3c4ff1c66d87d5074960b79b23003c3dbaf35d0 (patch)
tree7d8eae0ab89639ca23447eaa3dee8b79455cfeda /cmake
parent3707d139b301a5c73c20a6893904a03bb306e737 (diff)
cmake/msvc: fix buildopentrack-2.3.9
Dunno what was wrong otherwise.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/msvc.cmake38
1 files changed, 17 insertions, 21 deletions
diff --git a/cmake/msvc.cmake b/cmake/msvc.cmake
index 50144132..e54cd505 100644
--- a/cmake/msvc.cmake
+++ b/cmake/msvc.cmake
@@ -62,32 +62,28 @@ set(_LDFLAGS_STATIC "-machine:X86 -WX")
set(_LDFLAGS_STATIC_RELEASE "-LTCG:INCREMENTAL")
set(_LDFLAGS_STATIC_DEBUG "")
-foreach(j C CXX)
- foreach(i "" _DEBUG _RELEASE)
- set(CMAKE_${j}_FLAGS${i} "${CMAKE_${j}_FLAGS${i}} ${_${j}FLAGS${i}}")
- endforeach()
- set(CMAKE_${j}_FLAGS "${CMAKE_${j}_FLAGS} ${_${j}FLAGS}")
-endforeach()
-
-foreach(j "" _DEBUG _RELEASE)
- foreach(i MODULE EXE SHARED)
- set(CMAKE_${i}_LINKER_FLAGS${j} "${_LDFLAGS${j}} ${CMAKE_${i}_LINKER_FLAGS${j}}")
- endforeach()
-endforeach()
-
-set(CMAKE_STATIC_LINKER_FLAGS "${_LDFLAGS_STATIC} ${CMAKE_STATIC_LINKER_FLAGS}")
-set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${_LDFLAGS_STATIC_RELEASE} ${CMAKE_STATIC_LINKER_FLAGS_RELEASE}")
-set(CMAKE_STATIC_LINKER_FLAGS_DEBUG "${_LDFLAGS_STATIC_DEBUG} ${CMAKE_STATIC_LINKER_FLAGS_DEBUG}")
-
set(CMAKE_RC_FLAGS "-nologo -DWIN32")
if(NOT CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "" FORCE)
set(CMAKE_BUILD_TYPE "RELEASE" CACHE STRING "" FORCE)
- set(CMAKE_CXX_FLAGS_RELEASE " " CACHE STRING "" FORCE)
- set(CMAKE_C_FLAGS_RELEASE " " CACHE STRING "" FORCE)
- set(CMAKE_CXX_FLAGS " " CACHE STRING "" FORCE)
- set(CMAKE_C_FLAGS " " CACHE STRING "" FORCE)
+
+ set(CMAKE_STATIC_LINKER_FLAGS "${_LDFLAGS_STATIC} ${CMAKE_STATIC_LINKER_FLAGS}" CACHE STRING "" FORCE)
+ set(CMAKE_STATIC_LINKER_FLAGS_RELEASE "${_LDFLAGS_STATIC_RELEASE} ${CMAKE_STATIC_LINKER_FLAGS_RELEASE}" CACHE STRING "" FORCE)
+ set(CMAKE_STATIC_LINKER_FLAGS_DEBUG "${_LDFLAGS_STATIC_DEBUG} ${CMAKE_STATIC_LINKER_FLAGS_DEBUG}" CACHE STRING "" FORCE)
+
+ foreach(j C CXX)
+ foreach(i "" _DEBUG _RELEASE)
+ set(CMAKE_${j}_FLAGS${i} "${_${j}FLAGS${i}}" CACHE STRING "" FORCE)
+ endforeach()
+ set(CMAKE_${j}_FLAGS "${_${j}FLAGS}" CACHE STRING "" FORCE)
+ endforeach()
+
+ foreach(j "" _DEBUG _RELEASE)
+ foreach(i MODULE EXE SHARED)
+ set(CMAKE_${i}_LINKER_FLAGS${j} "${_LDFLAGS${j}}" CACHE STRING "" FORCE)
+ endforeach()
+ endforeach()
endif()
include("${CMAKE_CURRENT_LIST_DIR}/opentrack-policy.cmake")