summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt6
-rw-r--r--CMakeLists.txt.mingw84
-rw-r--r--src/common/fqterm_trace.cpp8
-rw-r--r--src/common/fqterm_trace.h8
-rw-r--r--src/utilities/fqwcwidth.h2
5 files changed, 100 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dd3213f..e55eed6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -66,7 +66,11 @@ ENDIF(NOT FQ_CORE_QT_CONFIG MATCHES "static")
SET(SUB_CMAKELIST "UNKNOWN")
IF(WIN32)
- SET(SUB_CMAKELIST "CMakeLists.txt.win32")
+ IF(MSYS MATCHES 1)
+ SET(SUB_CMAKELIST "CMakeLists.txt.mingw")
+ ELSE(MSYS MATCHES 1)
+ SET(SUB_CMAKELIST "CMakeLists.txt.win32")
+ ENDIF(MSYS MATCHES 1)
ELSE(WIN32)
IF(APPLE)
SET(SUB_CMAKELIST "CMakeLists.txt.macos")
diff --git a/CMakeLists.txt.mingw b/CMakeLists.txt.mingw
new file mode 100644
index 0000000..bdb3cfd
--- /dev/null
+++ b/CMakeLists.txt.mingw
@@ -0,0 +1,84 @@
+#set(OPENSSL_INCLUDE_DIR
+#"C:/openssl/include"
+#)
+
+#set(OPENSSL_LIBRARIES
+#"C:/openssl/lib/libeay32.lib"
+#"C:/openssl/lib/ssleay32.lib"
+#)
+
+#set(NETWORK_LIBRARIES
+#"ws2_32.lib"
+#)
+
+#SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "/Zi /Od /MD")
+
+#ADD_DEFINITIONS(/D USE_DOTNET_STYLE)
+#ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)
+ADD_DEFINITIONS(-D "FQTERM_VERSION_STRING=\\\"${FQTERM_VERSION}\\\"")
+
+if(FQTERM_USE_STATIC_QT)
+ ADD_DEFINITIONS(-DFQTERM_USE_STATIC_QT)
+ REMOVE_DEFINITIONS(-DQT_DLL)
+endif(FQTERM_USE_STATIC_QT)
+
+add_subdirectory(src)
+
+set(fqterm_RCS
+ fqterm.rc
+)
+
+include_directories(
+ ${QT_INCLUDE_DIR}
+ ${QT_QTCORE_INCLUDE_DIR}
+ ${QT_QTGUI_INCLUDE_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/common
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/protocol
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/terminal
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/utilities
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/ui
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/unite
+ ${CMAKE_CURRENT_SOURCE_DIR}/src/unite
+)
+
+link_directories(
+ ${QT_PLUGINS_DIR}/codecs
+ ${QT_PLUGINS_DIR}/imageformats
+)
+
+ADD_EXECUTABLE(fqterm
+ src/fqterm/main.cpp
+)
+
+#if(FQTERM_USE_STATIC_QT)
+ set(FQ_QT_STATIC_PLUGINS
+ qcncodecs qjpcodecs qkrcodecs qtwcodecs
+ qjpeg qgif qmng)
+#endif(FQTERM_USE_STATIC_QT)
+
+target_link_libraries(fqterm
+ fqterm_main
+ fqterm_terminal
+ fqterm_protocol
+ fqterm_utilities
+ fqterm_ui
+ fqterm_common
+ fqterm_unite
+ ${QT_LIBRARIES}
+ ${QT_QTNETWORK_LIBRARIES}
+ ${QT_QTSCRIPT_LIBRARIES}
+ ${QT_QTXML_LIBRARIES}
+ ${FQ_QT_STATIC_PLUGINS}
+ ${PYTHON_LIB}
+)
+
+add_dependencies(fqterm
+ fqterm_main
+ fqterm_common
+ fqterm_terminal
+ fqterm_protocol
+ fqterm_ui
+ fqterm_unite
+ fqterm_utilities
+ fqterm_unite
+)
diff --git a/src/common/fqterm_trace.cpp b/src/common/fqterm_trace.cpp
index 867b7ad..b08d8d0 100644
--- a/src/common/fqterm_trace.cpp
+++ b/src/common/fqterm_trace.cpp
@@ -20,7 +20,7 @@
#include <string>
-#ifdef WIN32
+#ifdef _MSC_VER
#include <hash_set>
#else
#include <set>
@@ -47,10 +47,10 @@ void setMaxTraceLevel(int max_trace_level) {
<< max_trace_level;
}
-#ifdef WIN32
+#ifdef _MSC_VER
typedef stdext::hash_set<std::string> CategorySet;
#else
-typedef std::set<std::string> CategorySet;
+typedef typename std::set<std::string> CategorySet;
#endif
CategorySet *getAllowedCategories() {
@@ -279,7 +279,7 @@ const char *getEventName(unsigned int type) {
* This assumes all Win32 compilers have 64-bit support.
*/
-#include <Windows.h>
+#include <windows.h>
#if defined(_MSC_VER) || defined(_MSC_EXTENSIONS) || defined(__WATCOMC__)
#define DELTA_EPOCH_IN_USEC 11644473600000000Ui64
diff --git a/src/common/fqterm_trace.h b/src/common/fqterm_trace.h
index 287a8a8..fc4b82d 100644
--- a/src/common/fqterm_trace.h
+++ b/src/common/fqterm_trace.h
@@ -60,8 +60,12 @@ int isAllowedCategory(const char *category, int trace_level);
void addAllowedCategory(const char *category);
static void soft_break() {
-#if defined(WIN32)
- __asm int 03h;
+#ifdef WIN32
+#ifdef _MSC_VER
+ __asm int 03h;
+#else
+ asm("int $0x03");
+#endif
#else
pause();
#endif
diff --git a/src/utilities/fqwcwidth.h b/src/utilities/fqwcwidth.h
index b2007bc..2eb4516 100644
--- a/src/utilities/fqwcwidth.h
+++ b/src/utilities/fqwcwidth.h
@@ -21,7 +21,7 @@
#ifndef FQTERM_FQWCWIDTH_H
#define FQTERM_FQWCWIDTH_H
-#ifdef WIN32
+#ifdef _MSC_VER
#define uint32_t unsigned __int32
#define uint16_t unsigned __int16
typedef wchar_t UTF16;