Add appveyor CI
3 files changed, 41 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dc917ffb..f38328b4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,7 +9,6 @@ set(CMAKE_C_COMPILER gcc)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
-
set(CMAKE_INCLUDE_CURRENT_DIR ON)
IF(NOT CMAKE_BUILD_TYPE)
@@ -47,13 +46,9 @@ SET(PROJECT_VERSION ${CPACK_PACKAGE_VERSION})
MESSAGE(STATUS "Version: ${PROJECT_VERSION}")
-set(CMAKE_CXX_FLAGS
- "${CMAKE_CXX_FLAGS} \
- -std=gnu++11 \
- -Wall \
- -Wextra \
- -Werror \
- -pedantic")
+if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11 -Wall -Wextra -Werror -pedantic")
+endif()
set(SRC_FILES
src/ChatPage.cc
@@ -133,5 +128,9 @@ qt5_wrap_cpp(MOC_HEADERS
qt5_add_resources(QRC resources/res.qrc)
-add_executable (nheko ${SRC_FILES} ${UI_HEADERS} ${MOC_HEADERS} ${QRC})
+add_executable (nheko ${OS_BUNDLE} ${SRC_FILES} ${UI_HEADERS} ${MOC_HEADERS} ${QRC})
target_link_libraries (nheko Qt5::Widgets Qt5::Network)
+
+if(WIN32)
+ target_link_libraries(nheko Qt5::WinMain)
+endif(WIN32)
diff --git a/README.md b/README.md
index 1d0299c6..e5d22709 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,6 @@
nheko
----
-[](https://travis-ci.org/mujx/nheko)
+[](https://travis-ci.org/mujx/nheko) [](https://ci.appveyor.com/project/mujx/nheko/branch/master)
The motivation behind the project is to provide a native desktop app for [Matrix] that
feels more like a mainstream chat app ([Riot], Telegram etc) and less like an IRC client.
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 00000000..4c2f9b96
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,32 @@
+version: 0.1.0-{build}
+
+environment:
+ global:
+ MSYSTEM: "MINGW64"
+
+platform: x64
+
+configuration:
+ - Release
+
+build:
+ verbosity: minimal
+
+install:
+ - set QT_DIR=C:\Qt\5.8\msvc2015_64
+ - set PATH=%PATH%;%QT_DIR%\bin;C:\MinGW\bin
+
+build_script:
+ - cmake -G "Visual Studio 14 2015 Win64" -H. -Bbuild -DCMAKE_BUILD_TYPE=Release
+ - cmake --build build
+ - ls -lh build
+
+after_build:
+ - mkdir NhekoRelease
+ - copy build\Debug\nheko.exe NhekoRelease\nheko.exe
+ - windeployqt --release NhekoRelease\nheko.exe
+ - 7z a nheko_win_64.zip .\NhekoRelease\*
+
+artifacts:
+ - path: nheko_win_64.zip
+ - path: NhekoRelease\nheko.exe
|