summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--cmake/mingw-w64.cmake8
1 files changed, 5 insertions, 3 deletions
diff --git a/cmake/mingw-w64.cmake b/cmake/mingw-w64.cmake
index 3aeafa69..d32f4a1c 100644
--- a/cmake/mingw-w64.cmake
+++ b/cmake/mingw-w64.cmake
@@ -9,7 +9,8 @@ SET(CMAKE_SYSTEM_VERSION 5)
# specify the cross compiler
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
#set(p D:/cygwin64/opt/bin/)
- set(p "/mingw32/bin/")
+ #set(p "/mingw32/bin/")
+ set(p "")
set(e .exe)
set(c "${p}")
else()
@@ -85,6 +86,8 @@ set(_CFLAGS_DEBUG "-g -O0 -fstack-protector-strong")
set(_CXXFLAGS_RELEASE "${_CFLAGS_RELEASE} ${cc}")
set(_CXXFLAGS_DEBUG "${_CFLAGS_DEBUG}")
+add_definitions(-DSTRSAFE_NO_DEPRECATE)
+
set(_LDFLAGS "-Wl,--dynamicbase,--nxcompat,--as-needed")
set(_LDFLAGS_RELEASE "-Wl,--gc-sections,--exclude-libs,ALL")
set(_LDFLAGS_DEBUG "")
@@ -112,8 +115,7 @@ foreach(j "" _DEBUG _RELEASE)
endforeach()
endforeach()
-if(NOT __otr_toolchain_initialized)
- set(__otr_toolchain_initialized 1 CACHE INTERNAL "" FORCE)
+if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "RELEASE" CACHE STRING "" FORCE)
set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/install" CACHE PATH "" FORCE)
endif()