wepogi9heih0ogn23w904nm90p3weh

master
dsc 3 years ago
parent b64d0ddb28
commit 92813c12e6

@ -6,6 +6,12 @@ set(VERSION_MAJOR "1")
set(VERSION_MINOR "1")
set(VERSION_REVISION "0")
option(MAEMO "compiling on maemo")
if(EXISTS "/usr/bin/maemo-launcher")
set(MAEMO ON)
message(STATUS "Compiling on Maemo Leste")
endif()
# add `cmake` directory as cmake module path
list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_SOURCE_DIR}/cmake")

@ -29,6 +29,11 @@ set_property(TARGET conversations PROPERTY RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BIN
target_include_directories(conversations PUBLIC ${Qt5Gui_PRIVATE_INCLUDE_DIRS})
if(MAEMO)
# @TODO: should not be necessary, but definition `Q_WS_MAEMO` is *not* available via CMake
target_compile_definitions(conversations PRIVATE MAEMO=1)
endif()
target_include_directories(conversations PUBLIC
${CMAKE_SOURCE_DIR}/src
${X11_INCLUDE_DIR}

@ -20,9 +20,8 @@ MainWindow::MainWindow(Conversations *ctx, QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow),
m_ctx(ctx) {
#ifdef Q_WS_MAEMO_5
#ifdef MAEMO
setProperty("X-Maemo-StackedWindow", 1);
window->setProperty("X-Maemo-Orientation", 2); // XXX: 2 = auto orientation
qInfo() << "ifdef Q_WS_MAEMO_5 OK!";
#else
qInfo() << "ifdef Q_WS_MAEMO_5 FAILED!";

Loading…
Cancel
Save