summaryrefslogtreecommitdiffstats
path: root/mkspecs/features/win32
diff options
context:
space:
mode:
Diffstat (limited to 'mkspecs/features/win32')
-rw-r--r--mkspecs/features/win32/console.prf2
-rw-r--r--mkspecs/features/win32/default_post.prf11
-rw-r--r--mkspecs/features/win32/default_pre.prf3
-rw-r--r--mkspecs/features/win32/dumpcpp.prf11
-rw-r--r--mkspecs/features/win32/embed_manifest_dll.prf11
-rw-r--r--mkspecs/features/win32/embed_manifest_exe.prf11
-rw-r--r--mkspecs/features/win32/exceptions.prf5
-rw-r--r--mkspecs/features/win32/exceptions_off.prf5
-rw-r--r--mkspecs/features/win32/opengl.prf3
-rw-r--r--mkspecs/features/win32/qaxcontainer.prf34
-rw-r--r--mkspecs/features/win32/qaxserver.prf64
-rw-r--r--mkspecs/features/win32/qt_dll.prf1
-rw-r--r--mkspecs/features/win32/rtti.prf3
-rw-r--r--mkspecs/features/win32/rtti_off.prf3
-rw-r--r--mkspecs/features/win32/stl.prf3
-rw-r--r--mkspecs/features/win32/stl_off.prf3
-rw-r--r--mkspecs/features/win32/thread.prf30
-rw-r--r--mkspecs/features/win32/thread_off.prf2
-rw-r--r--mkspecs/features/win32/windows.prf15
19 files changed, 220 insertions, 0 deletions
diff --git a/mkspecs/features/win32/console.prf b/mkspecs/features/win32/console.prf
new file mode 100644
index 0000000..b34e1c6
--- /dev/null
+++ b/mkspecs/features/win32/console.prf
@@ -0,0 +1,2 @@
+CONFIG -= windows
+contains(TEMPLATE, ".*app") : QMAKE_LFLAGS += $$QMAKE_LFLAGS_CONSOLE
diff --git a/mkspecs/features/win32/default_post.prf b/mkspecs/features/win32/default_post.prf
new file mode 100644
index 0000000..a1d8b52
--- /dev/null
+++ b/mkspecs/features/win32/default_post.prf
@@ -0,0 +1,11 @@
+!isEmpty(CE_ARCH) {
+ QMAKESPEC_DIR = $$QMAKESPEC
+ exists($$QMAKESPEC_DIR/default_post.prf) {
+ isEmpty(QMAKESPEC_DIR):QMAKESPEC_DIR = $$QMAKESPEC_ORIGINAL
+ !isEmpty(QMAKESPEC_DIR):load($$QMAKESPEC_DIR/default_post.prf)
+ }
+}
+
+# Now load the global default_post
+load(default_post)
+
diff --git a/mkspecs/features/win32/default_pre.prf b/mkspecs/features/win32/default_pre.prf
new file mode 100644
index 0000000..6789174
--- /dev/null
+++ b/mkspecs/features/win32/default_pre.prf
@@ -0,0 +1,3 @@
+CONFIG = rtti_off exceptions_off stl_off incremental_off thread_off windows $$CONFIG
+load(default_pre)
+
diff --git a/mkspecs/features/win32/dumpcpp.prf b/mkspecs/features/win32/dumpcpp.prf
new file mode 100644
index 0000000..1963799
--- /dev/null
+++ b/mkspecs/features/win32/dumpcpp.prf
@@ -0,0 +1,11 @@
+isEmpty(QMAKE_DUMPCPP_NAME) {
+ QMAKE_DUMPCPP_NAME = make_dumpcpp
+}
+
+# auto depend on dumpcpp
+!contains(TARGET, dumpcpp) {
+ isEmpty(QMAKE_DUMPCPP_SRC): QMAKE_DUMPCPP_SRC = "$(QTDIR)/tools/activeqt/dumpcpp"
+ make_dumpcpp.commands = (cd $$QMAKE_DUMPCPP_SRC && $(QMAKE) && $(MAKE))
+ QMAKE_EXTRA_TARGETS += $$QMAKE_DUMPCPP_NAME
+}
+
diff --git a/mkspecs/features/win32/embed_manifest_dll.prf b/mkspecs/features/win32/embed_manifest_dll.prf
new file mode 100644
index 0000000..90d9a2b
--- /dev/null
+++ b/mkspecs/features/win32/embed_manifest_dll.prf
@@ -0,0 +1,11 @@
+!if(plugin:no_plugin_manifest):if(win32-msvc2005|win32-msvc2008):!static:!equals(TEMPLATE_PREFIX, "vc"):equals(TEMPLATE, "lib") {
+ NOPATH_TARGET = $$TARGET
+ NOPATH_TARGET ~= s,\\ , ,q # Remove space escaping (NOPATH_TARGET is quoted)
+ NOPATH_TARGET ~= s,\\,/,g # Change to single type separators
+ NOPATH_TARGET ~= s,^(.*/)+,, # Remove all paths
+ QMAKE_LFLAGS += /MANIFEST $$quote(/MANIFESTFILE:\"$${OBJECTS_DIR}\\$${NOPATH_TARGET}.intermediate.manifest\")
+ QMAKE_PREV_POST_LINK = $$QMAKE_POST_LINK
+ QMAKE_POST_LINK = $$quote(mt.exe -nologo -manifest \"$$replace(OBJECTS_DIR,/,\\)\\$${NOPATH_TARGET}.intermediate.manifest\" -outputresource:$(DESTDIR_TARGET);2$$escape_expand(\n\t))
+ QMAKE_POST_LINK += $$QMAKE_PREV_POST_LINK
+ QMAKE_CLEAN += \"$$replace(OBJECTS_DIR,/,\\)\\$${NOPATH_TARGET}.intermediate.manifest\"
+}
diff --git a/mkspecs/features/win32/embed_manifest_exe.prf b/mkspecs/features/win32/embed_manifest_exe.prf
new file mode 100644
index 0000000..e1747f1
--- /dev/null
+++ b/mkspecs/features/win32/embed_manifest_exe.prf
@@ -0,0 +1,11 @@
+if(win32-msvc2005|win32-msvc2008):!equals(TEMPLATE_PREFIX, "vc"):equals(TEMPLATE, "app") {
+ NOPATH_TARGET = $$TARGET
+ NOPATH_TARGET ~= s,\\ , ,q # Remove space escaping (NOPATH_TARGET is quoted)
+ NOPATH_TARGET ~= s,\\,/,g # Change to single type separators
+ NOPATH_TARGET ~= s,^(.*/)+,, # Remove all paths
+ QMAKE_LFLAGS += /MANIFEST $$quote(/MANIFESTFILE:\"$${OBJECTS_DIR}\\$${NOPATH_TARGET}.intermediate.manifest\")
+ QMAKE_PREV_POST_LINK = $$QMAKE_POST_LINK
+ QMAKE_POST_LINK = $$quote(mt.exe -nologo -manifest \"$$replace(OBJECTS_DIR,/,\\)\\$${NOPATH_TARGET}.intermediate.manifest\" -outputresource:$(DESTDIR_TARGET);1$$escape_expand(\n\t))
+ QMAKE_POST_LINK += $$QMAKE_PREV_POST_LINK
+ QMAKE_CLEAN += \"$$replace(OBJECTS_DIR,/,\\)\\$${NOPATH_TARGET}.intermediate.manifest\"
+}
diff --git a/mkspecs/features/win32/exceptions.prf b/mkspecs/features/win32/exceptions.prf
new file mode 100644
index 0000000..7866659
--- /dev/null
+++ b/mkspecs/features/win32/exceptions.prf
@@ -0,0 +1,5 @@
+CONFIG -= exceptions_off
+QMAKE_CFLAGS *= $$QMAKE_CFLAGS_EXCEPTIONS_ON
+QMAKE_CXXFLAGS *= $$QMAKE_CXXFLAGS_EXCEPTIONS_ON
+QMAKE_LFLAGS *= $$QMAKE_LFLAGS_EXCEPTIONS_ON
+
diff --git a/mkspecs/features/win32/exceptions_off.prf b/mkspecs/features/win32/exceptions_off.prf
new file mode 100644
index 0000000..9de53d3
--- /dev/null
+++ b/mkspecs/features/win32/exceptions_off.prf
@@ -0,0 +1,5 @@
+CONFIG -= exceptions
+QMAKE_CFLAGS += $$QMAKE_CFLAGS_EXCEPTIONS_OFF
+QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_EXCEPTIONS_OFF
+QMAKE_LFLAGS += $$QMAKE_LFLAGS_EXCEPTIONS_OFF
+
diff --git a/mkspecs/features/win32/opengl.prf b/mkspecs/features/win32/opengl.prf
new file mode 100644
index 0000000..30af2a3
--- /dev/null
+++ b/mkspecs/features/win32/opengl.prf
@@ -0,0 +1,3 @@
+QMAKE_LIBS += $$QMAKE_LIBS_OPENGL
+QMAKE_LFLAGS += $$QMAKE_LFLAGS_OPENGL
+
diff --git a/mkspecs/features/win32/qaxcontainer.prf b/mkspecs/features/win32/qaxcontainer.prf
new file mode 100644
index 0000000..49edb2a
--- /dev/null
+++ b/mkspecs/features/win32/qaxcontainer.prf
@@ -0,0 +1,34 @@
+!debug_and_release|build_pass {
+ CONFIG(debug, debug|release) {
+ LIBS += -lQAxContainerd
+ } else {
+ LIBS += -lQAxContainer
+ }
+} else {
+ LIBS += -lQAxContainer
+}
+
+isEmpty(QMAKE_DUMPCPP) {
+ win32:QMAKE_DUMPCPP = $$[QT_INSTALL_BINS]\dumpcpp.exe
+}
+
+dumpcpp_decl.commands = $$QMAKE_DUMPCPP ${QMAKE_FILE_IN} -o ${QMAKE_FILE_BASE}
+qaxcontainer_compat: dumpcpp_decl.commands += -compat
+dumpcpp_decl.output = ${QMAKE_FILE_BASE}.h
+dumpcpp_decl.input = TYPELIBS
+dumpcpp_decl.variable_out = HEADERS
+dumpcpp_decl.name = DUMP
+dumpcpp_decl.CONFIG += no_link
+dumpcpp_decl.depends = $$QMAKE_DUMPCPP
+
+QMAKE_EXTRA_COMPILERS += dumpcpp_decl
+
+
+dumpcpp_impl.commands = $$QMAKE_DUMPCPP -donothing
+dumpcpp_impl.output = ${QMAKE_FILE_BASE}.cpp
+dumpcpp_impl.input = TYPELIBS
+dumpcpp_impl.variable_out = SOURCES
+dumpcpp_impl.name = CPP
+dumpcpp_impl.depends = $$QMAKE_DUMPCPP ${QMAKE_FILE_BASE}.h
+
+QMAKE_EXTRA_COMPILERS += dumpcpp_impl
diff --git a/mkspecs/features/win32/qaxserver.prf b/mkspecs/features/win32/qaxserver.prf
new file mode 100644
index 0000000..a18c421
--- /dev/null
+++ b/mkspecs/features/win32/qaxserver.prf
@@ -0,0 +1,64 @@
+build_pass:console: {
+ warning("QAxServer applications cannot be console applications.")
+ warning("Remove 'console' from your CONFIG.")
+}
+
+ACTIVEQT_VERSION = $$VERSION
+isEmpty(ACTIVEQT_VERSION):ACTIVEQT_VERSION = 1.0
+
+DEFINES += QAXSERVER
+
+ACTIVEQT_IDE = makefile
+equals(TEMPLATE_PREFIX, "vc"):ACTIVEQT_IDE = VisualStudio
+equals(TEMPLATE, "vcapp"):ACTIVEQT_IDE = VisualStudio
+equals(TEMPLATE, "vclib"):ACTIVEQT_IDE = VisualStudio
+
+equals(ACTIVEQT_IDE, "VisualStudio") {
+ ACTIVEQT_IDC = $${QMAKE_IDC}
+ ACTIVEQT_IDL = $${QMAKE_IDL}
+ ACTIVEQT_TARGET = "$(TargetPath)"
+ win32-msvc {
+ ACTIVEQT_NEWLINE = $$escape_expand(\t)
+ ACTIVEQT_OUTPUT = $(IntDir)/$${TARGET}
+ } else {
+ ACTIVEQT_NEWLINE = $$escape_expand(\n\t)
+ ACTIVEQT_OUTPUT = $(IntDir)$${TARGET}
+ }
+ ACTIVEQT_TLBOUT = "$(TargetDir)/$${TARGET}.tlb"
+ GENERATED += $${OBJECTS_DIR}/$${TARGET}.idl $${ACTIVEQT_TLBOUT}
+}
+equals(ACTIVEQT_IDE, "makefile") {
+ ACTIVEQT_IDC = -$(IDC)
+ ACTIVEQT_IDL = -$(IDL)
+ ACTIVEQT_NEWLINE = $$escape_expand(\n\t)
+ ACTIVEQT_TARGET = $(DESTDIR_TARGET)
+ ACTIVEQT_OUTPUT = $(OBJECTS_DIR)/$${TARGET}
+ isEmpty(DESTDIR) {
+ ACTIVEQT_TLBOUT = $${TARGET}.tlb
+ } else {
+ ACTIVEQT_TLBOUT = $${DESTDIR}/$${TARGET}.tlb
+ }
+}
+
+!qaxserver_no_postlink {
+ !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK += $$quote($$ACTIVEQT_NEWLINE)
+ QMAKE_POST_LINK += $$quote($$ACTIVEQT_IDC $${ACTIVEQT_TARGET} /idl $${ACTIVEQT_OUTPUT}.idl -version $${ACTIVEQT_VERSION}$${ACTIVEQT_NEWLINE})
+ !isEmpty(RC_FILE) {
+ QMAKE_POST_LINK += $$quote($$ACTIVEQT_IDL "$${ACTIVEQT_OUTPUT}.idl" /nologo /tlb "$${ACTIVEQT_OUTPUT}.tlb"$$ACTIVEQT_NEWLINE)
+ QMAKE_POST_LINK += $$quote($$ACTIVEQT_IDC $${ACTIVEQT_TARGET} /tlb $${ACTIVEQT_OUTPUT}.tlb$$ACTIVEQT_NEWLINE)
+ } else {
+ QMAKE_POST_LINK += $$quote($$ACTIVEQT_IDL "$${ACTIVEQT_OUTPUT}.idl" /nologo /tlb "$${ACTIVEQT_TLBOUT}"$$ACTIVEQT_NEWLINE)
+ message("No rc-file linked into project; type library will be a separate file.")
+ }
+ QMAKE_POST_LINK += $$quote($$ACTIVEQT_IDC $${ACTIVEQT_TARGET} /regserver)
+ QMAKE_CLEAN += $${ACTIVEQT_OUTPUT}.idl $${ACTIVEQT_OUTPUT}.tlb
+}
+
+qt:!target_qt {
+ CONFIG(debug, debug|release) {
+ QMAKE_LIBS_QT_ENTRY = -lQAxServerd
+ } else {
+ QMAKE_LIBS_QT_ENTRY = -lQAxServer
+ }
+ dll:QMAKE_LIBS += $$QMAKE_LIBS_QT_ENTRY
+}
diff --git a/mkspecs/features/win32/qt_dll.prf b/mkspecs/features/win32/qt_dll.prf
new file mode 100644
index 0000000..f03c0c0
--- /dev/null
+++ b/mkspecs/features/win32/qt_dll.prf
@@ -0,0 +1 @@
+CONFIG *= qt
diff --git a/mkspecs/features/win32/rtti.prf b/mkspecs/features/win32/rtti.prf
new file mode 100644
index 0000000..6d720d2
--- /dev/null
+++ b/mkspecs/features/win32/rtti.prf
@@ -0,0 +1,3 @@
+CONFIG -= rtti_off
+QMAKE_CFLAGS += $$QMAKE_CFLAGS_RTTI_ON
+QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_RTTI_ON
diff --git a/mkspecs/features/win32/rtti_off.prf b/mkspecs/features/win32/rtti_off.prf
new file mode 100644
index 0000000..8f175de
--- /dev/null
+++ b/mkspecs/features/win32/rtti_off.prf
@@ -0,0 +1,3 @@
+CONFIG -= rtti
+QMAKE_CFLAGS += $$QMAKE_CFLAGS_RTTI_OFF
+QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_RTTI_OFF
diff --git a/mkspecs/features/win32/stl.prf b/mkspecs/features/win32/stl.prf
new file mode 100644
index 0000000..caf30ef
--- /dev/null
+++ b/mkspecs/features/win32/stl.prf
@@ -0,0 +1,3 @@
+CONFIG -= stl_off
+QMAKE_CFLAGS *= $$QMAKE_CFLAGS_STL_ON
+QMAKE_CXXFLAGS *= $$QMAKE_CXXFLAGS_STL_ON
diff --git a/mkspecs/features/win32/stl_off.prf b/mkspecs/features/win32/stl_off.prf
new file mode 100644
index 0000000..10198c7
--- /dev/null
+++ b/mkspecs/features/win32/stl_off.prf
@@ -0,0 +1,3 @@
+CONFIG -= stl
+QMAKE_CFLAGS += $$QMAKE_CFLAGS_STL_OFF
+QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_STL_OFF
diff --git a/mkspecs/features/win32/thread.prf b/mkspecs/features/win32/thread.prf
new file mode 100644
index 0000000..aa844d2
--- /dev/null
+++ b/mkspecs/features/win32/thread.prf
@@ -0,0 +1,30 @@
+CONFIG -= thread_off
+qt {
+ target_qt:PRL_EXPORT_DEFINES += QT_THREAD_SUPPORT
+ else:DEFINES += QT_THREAD_SUPPORT
+}
+
+# #### These need to go
+debug {
+ contains(DEFINES, QT_DLL) {
+ QMAKE_CFLAGS += $$QMAKE_CFLAGS_MT_DLLDBG
+ QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_MT_DLLDBG
+ } else {
+ QMAKE_CFLAGS += $$QMAKE_CFLAGS_MT_DBG
+ QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_MT_DBG
+ }
+} else {
+ contains(DEFINES, QT_DLL) {
+ QMAKE_CFLAGS += $$QMAKE_CFLAGS_MT_DLL
+ QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_MT_DLL
+ } else {
+ QMAKE_CFLAGS += $$QMAKE_CFLAGS_MT
+ QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_MT
+ }
+}
+
+win32-msvc|win32-msvc.net {
+ !contains(DEFINES, QT_DLL):!target_qt:!isEqual(TARGET, qtmain):QMAKE_LFLAGS += /NODEFAULTLIB:"libc"
+}
+
+QMAKE_LIBS += $$QMAKE_LIBS_RTMT
diff --git a/mkspecs/features/win32/thread_off.prf b/mkspecs/features/win32/thread_off.prf
new file mode 100644
index 0000000..436a2c8
--- /dev/null
+++ b/mkspecs/features/win32/thread_off.prf
@@ -0,0 +1,2 @@
+CONFIG -= thread
+QMAKE_LIBS += $$QMAKE_LIBS_RT
diff --git a/mkspecs/features/win32/windows.prf b/mkspecs/features/win32/windows.prf
new file mode 100644
index 0000000..f037c1a
--- /dev/null
+++ b/mkspecs/features/win32/windows.prf
@@ -0,0 +1,15 @@
+CONFIG -= console
+contains(TEMPLATE, ".*app"){
+ QMAKE_LFLAGS += $$QMAKE_LFLAGS_WINDOWS
+ win32-g++:DEFINES += QT_NEEDS_QMAIN
+ win32-borland:DEFINES += QT_NEEDS_QMAIN
+
+ qt:for(entryLib, $$list($$unique(QMAKE_LIBS_QT_ENTRY))) {
+ isEqual(entryLib, -lqtmain): {
+ CONFIG(debug, debug|release): QMAKE_LIBS += $${entryLib}d
+ else: QMAKE_LIBS += $${entryLib}
+ } else {
+ QMAKE_LIBS += $${entryLib}
+ }
+ }
+}