mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-10-30 09:30:47 +03:00
Build lmdb on appveyor
This commit is contained in:
parent
7ad45d8d64
commit
35355756e5
3 changed files with 33 additions and 12 deletions
|
@ -1,17 +1,33 @@
|
||||||
cmake_minimum_required(VERSION 3.1)
|
cmake_minimum_required(VERSION 3.1)
|
||||||
|
|
||||||
project(nheko CXX)
|
project(nheko C CXX)
|
||||||
|
|
||||||
option(BUILD_TESTS "Build all tests" OFF)
|
option(BUILD_TESTS "Build all tests" OFF)
|
||||||
|
option(APPVEYOR_BUILD "Build on appveyor" OFF)
|
||||||
|
|
||||||
#
|
#
|
||||||
# LMDB
|
# LMDB
|
||||||
#
|
#
|
||||||
find_path (LMDB_INCLUDE_DIR NAMES lmdb.h PATHS "$ENV{LMDB_DIR}/include")
|
if(APPVEYOR_BUILD)
|
||||||
find_library (LMDB_LIBRARY NAMES lmdb PATHS "$ENV{LMDB_DIR}/lib" )
|
set(LMDB_VERSION "LMDB_0.9.21")
|
||||||
|
set(NTDLIB "C:/WINDDK/7600.16385.1/lib/win7/amd64/ntdll.lib")
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
execute_process(
|
||||||
find_package_handle_standard_args(LMDB DEFAULT_MSG LMDB_INCLUDE_DIR LMDB_LIBRARY)
|
COMMAND git clone --depth=1 --branch ${LMDB_VERSION} https://github.com/LMDB/lmdb)
|
||||||
|
|
||||||
|
set(LMDB_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/lmdb/libraries/liblmdb)
|
||||||
|
|
||||||
|
add_library(lmdb
|
||||||
|
${CMAKE_SOURCE_DIR}/lmdb/libraries/liblmdb/lmdb.h
|
||||||
|
${CMAKE_SOURCE_DIR}/lmdb/libraries/liblmdb/mdb.c
|
||||||
|
${CMAKE_SOURCE_DIR}/lmdb/libraries/liblmdb/midl.h
|
||||||
|
${CMAKE_SOURCE_DIR}/lmdb/libraries/liblmdb/midl.c)
|
||||||
|
else()
|
||||||
|
find_path (LMDB_INCLUDE_DIR NAMES lmdb.h PATHS "$ENV{LMDB_DIR}/include")
|
||||||
|
find_library (LMDB_LIBRARY NAMES lmdb PATHS "$ENV{LMDB_DIR}/lib" )
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(LMDB DEFAULT_MSG LMDB_INCLUDE_DIR LMDB_LIBRARY)
|
||||||
|
endif()
|
||||||
|
|
||||||
if (NOT EXISTS "${CMAKE_SOURCE_DIR}/libs/lmdbxx/.git" )
|
if (NOT EXISTS "${CMAKE_SOURCE_DIR}/libs/lmdbxx/.git" )
|
||||||
message(WARNING "The git submodules are not available.")
|
message(WARNING "The git submodules are not available.")
|
||||||
|
@ -298,7 +314,12 @@ else()
|
||||||
#
|
#
|
||||||
# Build the executable.
|
# Build the executable.
|
||||||
#
|
#
|
||||||
|
if(APPVEYOR_BUILD)
|
||||||
|
set (NHEKO_LIBS matrix_events Qt5::Widgets Qt5::Network lmdb)
|
||||||
|
else()
|
||||||
set (NHEKO_LIBS matrix_events Qt5::Widgets Qt5::Network ${LMDB_LIBRARY})
|
set (NHEKO_LIBS matrix_events Qt5::Widgets Qt5::Network ${LMDB_LIBRARY})
|
||||||
|
endif()
|
||||||
|
|
||||||
set (NHEKO_DEPS ${OS_BUNDLE} ${SRC_FILES} ${UI_HEADERS} ${MOC_HEADERS} ${QRC} ${LANG_QRC} ${QM_SRC})
|
set (NHEKO_DEPS ${OS_BUNDLE} ${SRC_FILES} ${UI_HEADERS} ${MOC_HEADERS} ${QRC} ${LANG_QRC} ${QM_SRC})
|
||||||
|
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
|
@ -306,7 +327,7 @@ else()
|
||||||
target_link_libraries (nheko ${NHEKO_LIBS} Qt5::MacExtras)
|
target_link_libraries (nheko ${NHEKO_LIBS} Qt5::MacExtras)
|
||||||
elseif(WIN32)
|
elseif(WIN32)
|
||||||
add_executable (nheko ${ICON_FILE} ${NHEKO_DEPS})
|
add_executable (nheko ${ICON_FILE} ${NHEKO_DEPS})
|
||||||
target_link_libraries (nheko ${NHEKO_LIBS} Qt5::WinMain)
|
target_link_libraries (nheko ${NTDLIB} ${NHEKO_LIBS} Qt5::WinMain)
|
||||||
else()
|
else()
|
||||||
add_executable (nheko ${NHEKO_DEPS})
|
add_executable (nheko ${NHEKO_DEPS})
|
||||||
target_link_libraries (nheko ${NHEKO_LIBS})
|
target_link_libraries (nheko ${NHEKO_LIBS})
|
||||||
|
|
|
@ -19,9 +19,8 @@ install:
|
||||||
- cinst nsis --version 3.0 -y -installArgs /D=C:\nsis
|
- cinst nsis --version 3.0 -y -installArgs /D=C:\nsis
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- cmake -G "Visual Studio 14 2015 Win64" -H. -Bbuild
|
- cmake -G "Visual Studio 14 2015 Win64" -H. -Bbuild -DAPPVEYOR_BUILD=ON
|
||||||
- cmake --build build --config Release
|
- cmake --build build --config Release
|
||||||
- ls -lh build
|
|
||||||
|
|
||||||
after_build:
|
after_build:
|
||||||
- mkdir NhekoRelease
|
- mkdir NhekoRelease
|
||||||
|
|
|
@ -147,7 +147,8 @@ RoomList::setInitialRooms(const QMap<QString, QSharedPointer<RoomSettings>> &set
|
||||||
new RoomInfoListItem(settings[room_id], state, room_id, scrollArea_);
|
new RoomInfoListItem(settings[room_id], state, room_id, scrollArea_);
|
||||||
connect(
|
connect(
|
||||||
room_item, &RoomInfoListItem::clicked, this, &RoomList::highlightSelectedRoom);
|
room_item, &RoomInfoListItem::clicked, this, &RoomList::highlightSelectedRoom);
|
||||||
connect(room_item, &RoomInfoListItem::leaveRoom, this, &RoomList::openLeaveRoomDialog);
|
connect(
|
||||||
|
room_item, &RoomInfoListItem::leaveRoom, this, &RoomList::openLeaveRoomDialog);
|
||||||
|
|
||||||
rooms_.insert(room_id, QSharedPointer<RoomInfoListItem>(room_item));
|
rooms_.insert(room_id, QSharedPointer<RoomInfoListItem>(room_item));
|
||||||
|
|
||||||
|
@ -168,9 +169,9 @@ void
|
||||||
RoomList::openLeaveRoomDialog(const QString &room_id)
|
RoomList::openLeaveRoomDialog(const QString &room_id)
|
||||||
{
|
{
|
||||||
leaveRoomDialog_ = new LeaveRoomDialog(this);
|
leaveRoomDialog_ = new LeaveRoomDialog(this);
|
||||||
connect(leaveRoomDialog_,
|
connect(leaveRoomDialog_, &LeaveRoomDialog::closing, this, [=](bool leaving) {
|
||||||
&LeaveRoomDialog::closing, this,
|
closeLeaveRoomDialog(leaving, room_id);
|
||||||
[=](bool leaving) { closeLeaveRoomDialog(leaving, room_id); });
|
});
|
||||||
|
|
||||||
leaveRoomModal = new OverlayModal(MainWindow::instance(), leaveRoomDialog_);
|
leaveRoomModal = new OverlayModal(MainWindow::instance(), leaveRoomDialog_);
|
||||||
leaveRoomModal->setDuration(0);
|
leaveRoomModal->setDuration(0);
|
||||||
|
|
Loading…
Reference in a new issue