[MSPAINT] Added Vietnamese translation. (#722)
[reactos.git] / toolchain-gcc.cmake
index a930b49..cc1b25a 100644 (file)
@@ -3,6 +3,12 @@ if(NOT ARCH)
     set(ARCH i386)
 endif()
 
+# Default to Debug for the build type
+if(NOT DEFINED CMAKE_BUILD_TYPE)
+    set(CMAKE_BUILD_TYPE "Debug" CACHE STRING
+        "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel.")
+endif()
+
 # Choose the right MinGW toolchain prefix
 if (NOT DEFINED MINGW_TOOLCHAIN_PREFIX)
     if(ARCH STREQUAL "i386")
@@ -46,18 +52,17 @@ set(CMAKE_ASM_COMPILER_ID "GNU")
 set(CMAKE_MC_COMPILER ${MINGW_TOOLCHAIN_PREFIX}windmc)
 set(CMAKE_RC_COMPILER ${MINGW_TOOLCHAIN_PREFIX}windres)
 set(CMAKE_DLLTOOL ${MINGW_TOOLCHAIN_PREFIX}dlltool)
+#set(CMAKE_AR ${MINGW_TOOLCHAIN_PREFIX}gcc-ar${MINGW_TOOLCHAIN_SUFFIX})
 
-if(NOT CMAKE_HOST_SYSTEM_NAME STREQUAL "Windows")
-    set(CMAKE_C_CREATE_STATIC_LIBRARY "<CMAKE_AR> crs <TARGET> <LINK_FLAGS> <OBJECTS>")
-    set(CMAKE_CXX_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})
-    set(CMAKE_ASM_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})
-endif()
+set(CMAKE_C_CREATE_STATIC_LIBRARY "<CMAKE_AR> crT <TARGET> <LINK_FLAGS> <OBJECTS>")
+set(CMAKE_CXX_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})
+set(CMAKE_ASM_CREATE_STATIC_LIBRARY ${CMAKE_C_CREATE_STATIC_LIBRARY})
 
 # Don't link with anything by default unless we say so
 set(CMAKE_C_STANDARD_LIBRARIES "-lgcc" CACHE STRING "Standard C Libraries")
 
 #MARK_AS_ADVANCED(CLEAR CMAKE_CXX_STANDARD_LIBRARIES)
-set(CMAKE_CXX_STANDARD_LIBRARIES "" CACHE STRING "Standard C++ Libraries")
+set(CMAKE_CXX_STANDARD_LIBRARIES "-lgcc" CACHE STRING "Standard C++ Libraries")
 
 set(CMAKE_SHARED_LINKER_FLAGS_INIT "-nostdlib -Wl,--enable-auto-image-base,--disable-auto-import")