Commit a2f4b6c2 authored by Sharaf Zaman's avatar Sharaf Zaman

Fix change which broke desktop builts

Build directory need not be in src directory
parent c738c293
......@@ -254,32 +254,32 @@ endif(MINGW)
# FIXME: Apparently there is no better way to do this in android toolchain
if(ANDROID)
set (Qt5_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5/)
set (Qt5Core_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5Core/)
set (Qt5Gui_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5Gui/)
set (Qt5Widgets_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5Widgets/)
set (Qt5Xml_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5Xml/)
set (Qt5Network_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5Network/)
set (Qt5PrintSupport_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5PrintSupport/)
set (Qt5Svg_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5Svg/)
set (Qt5Test_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5Test/)
set (Qt5Concurrent_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5Concurrent/)
set (Qt5Multimedia_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5Multimedia/)
set (Qt5Qml_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5Qml/)
set (Qt5Quick_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5Quick/)
set (Qt5QuickWidgets_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5QuickWidgets/)
set(ECM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/kf5/kde/install/share/ECM/cmake)
set(KF5Config_DIR ${CMAKE_CURRENT_SOURCE_DIR}/kf5/kde/install/lib/cmake/KF5Config/)
set(KF5Config_DIR ${CMAKE_CURRENT_SOURCE_DIR}/kf5/kde/install/lib/cmake/KF5Config/)
set(KF5I18n_DIR ${CMAKE_CURRENT_SOURCE_DIR}/kf5/kde/install/lib/cmake/KF5I18n/)
set(KF5WidgetsAddons_DIR ${CMAKE_CURRENT_SOURCE_DIR}/kf5/kde/install/lib/cmake/KF5WidgetsAddons)
set(KF5Completion_DIR ${CMAKE_CURRENT_SOURCE_DIR}/kf5/kde/install/lib/cmake/KF5Completion)
set(KF5GuiAddons_DIR ${CMAKE_CURRENT_SOURCE_DIR}/kf5/kde/install/lib/cmake/KF5GuiAddons)
set(KF5ItemViews_DIR ${CMAKE_CURRENT_SOURCE_DIR}/kf5/kde/install/lib/cmake/KF5ItemViews)
set(KF5WindowSystem_DIR ${CMAKE_CURRENT_SOURCE_DIR}/kf5/kde/install/lib/cmake/KF5WindowSystem)
set(KF5ItemModels_DIR ${CMAKE_CURRENT_SOURCE_DIR}/kf5/kde/install/lib/cmake/KF5ItemModels)
set(KF5CoreAddons_DIR ${CMAKE_CURRENT_SOURCE_DIR}/kf5/kde/install/lib/cmake/KF5CoreAddons)
set (Qt5_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5/)
set (Qt5Core_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5Core/)
set (Qt5Gui_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5Gui/)
set (Qt5Widgets_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5Widgets/)
set (Qt5Xml_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5Xml/)
set (Qt5Network_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5Network/)
set (Qt5PrintSupport_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5PrintSupport/)
set (Qt5Svg_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5Svg/)
set (Qt5Test_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5Test/)
set (Qt5Concurrent_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5Concurrent/)
set (Qt5Multimedia_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5Multimedia/)
set (Qt5Qml_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5Qml/)
set (Qt5Quick_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5Quick/)
set (Qt5QuickWidgets_DIR $ENV{QT_ANDROID}/lib/cmake/Qt5QuickWidgets/)
set(ECM_DIR ${CMAKE_CURRENT_BINARY_DIR}/kf5/kde/install/share/ECM/cmake)
set(KF5Config_DIR ${CMAKE_CURRENT_BINARY_DIR}/kf5/kde/install/lib/cmake/KF5Config/)
set(KF5Config_DIR ${CMAKE_CURRENT_BINARY_DIR}/kf5/kde/install/lib/cmake/KF5Config/)
set(KF5I18n_DIR ${CMAKE_CURRENT_BINARY_DIR}/kf5/kde/install/lib/cmake/KF5I18n/)
set(KF5WidgetsAddons_DIR ${CMAKE_CURRENT_BINARY_DIR}/kf5/kde/install/lib/cmake/KF5WidgetsAddons)
set(KF5Completion_DIR ${CMAKE_CURRENT_BINARY_DIR}/kf5/kde/install/lib/cmake/KF5Completion)
set(KF5GuiAddons_DIR ${CMAKE_CURRENT_BINARY_DIR}/kf5/kde/install/lib/cmake/KF5GuiAddons)
set(KF5ItemViews_DIR ${CMAKE_CURRENT_BINARY_DIR}/kf5/kde/install/lib/cmake/KF5ItemViews)
set(KF5WindowSystem_DIR ${CMAKE_CURRENT_BINARY_DIR}/kf5/kde/install/lib/cmake/KF5WindowSystem)
set(KF5ItemModels_DIR ${CMAKE_CURRENT_BINARY_DIR}/kf5/kde/install/lib/cmake/KF5ItemModels)
set(KF5CoreAddons_DIR ${CMAKE_CURRENT_BINARY_DIR}/kf5/kde/install/lib/cmake/KF5CoreAddons)
endif()
......@@ -338,16 +338,6 @@ find_package(Qt5 ${MIN_QT_VERSION}
Concurrent
)
if (UNIX AND NOT APPLE AND NOT ANDROID)
if (${Qt5_VERSION} VERSION_GREATER "5.11")
set (USE_QT_XCB ON)
else()
option(USE_QT_XCB "Do not use Krita's forked XCB connection and tablet support on X11, but leave everything to Qt." OFF)
add_feature_info("Use Qt's XCB and Tablet support on X11" USE_QT_XCB "Do not use Krita's forked XCB connection and tablet support on X11, but leave everything to Qt.")
endif()
configure_file(config_use_qt_xcb.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config_use_qt_xcb.h)
endif()
include (MacroAddFileDependencies)
include (MacroBoolTo01)
include (MacroEnsureOutOfSourceBuild)
......@@ -499,16 +489,16 @@ set(KRITA_PLUGIN_INSTALL_DIR ${LIB_INSTALL_DIR}/kritaplugins)
###########################
if (ANDROID)
set (PNG_LIBRARY ${CMAKE_CURRENT_SOURCE_DIR}/i/lib/libpng16.so)
set (PNG_PNG_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/i/include/libpng16)
set (LibExiv2_LIBRARIES ${CMAKE_CURRENT_SOURCE_DIR}/i/lib/libexiv2.so)
set (LibExiv2_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/i/include/)
set (LCMS2_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/i/include)
set (LCMS2_LIBRARIES ${CMAKE_CURRENT_SOURCE_DIR}/i/lib/liblcms2.so)
set (QUAZIP_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/i/include/quazip5)
set (QUAZIP_LIBRARIES ${CMAKE_CURRENT_SOURCE_DIR}/i/lib/libquazip5.so)
set (Boost_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/i/armeabi-v7a/include/boost-1_69)
set (Boost_LIBRARY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/i/armeabi-v7a/lib)
set (PNG_LIBRARY ${CMAKE_CURRENT_BINARY_DIR}/i/lib/libpng16.so)
set (PNG_PNG_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/i/include/libpng16)
set (LibExiv2_LIBRARIES ${CMAKE_CURRENT_BINARY_DIR}/i/lib/libexiv2.so)
set (LibExiv2_INCLUDE_DIRS ${CMAKE_CURRENT_BINARY_DIR}/i/include/)
set (LCMS2_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/i/include)
set (LCMS2_LIBRARIES ${CMAKE_CURRENT_BINARY_DIR}/i/lib/liblcms2.so)
set (QUAZIP_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/i/include/quazip5)
set (QUAZIP_LIBRARIES ${CMAKE_CURRENT_BINARY_DIR}/i/lib/libquazip5.so)
set (Boost_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/i/armeabi-v7a/include/boost-1_69)
set (Boost_LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/i/armeabi-v7a/lib)
endif()
find_package(PNG REQUIRED)
......
#!/bin/sh
: ${KRITA_ROOT?"Project root path must be set"}
: ${CMAKE_ANDROID_NDK?"Android NDK path must be set"}
: ${BUILD_ROOT? "Built roott path must be set"}
CURDIR="$(pwd)"/
VERSION="1_69"
git clone https://github.com/moritz-wundke/Boost-for-Android $KRITA_ROOT/d/boost
git clone https://github.com/moritz-wundke/Boost-for-Android $BUILD_ROOT/d/boost
cd $KRITA_ROOT/d/boost
cd $BUILD_ROOT/d/boost
./build-android.sh --prefix=$KRITA_ROOT/i --with-libraries=system \
./build-android.sh --prefix=$BUILD_ROOT/i --with-libraries=system \
--boost=1.69.0 --arch=armeabi-v7a \
$CMAKE_ANDROID_NDK
cd $KRITA_ROOT/i/armeabi-v7a/lib
cd $BUILD_ROOT/i/armeabi-v7a/lib
# possible only because just one library is being used
mv libboost_system-clang-mt-a32-$VERSION.a libboost_system.a
cd $CURDIR
......@@ -9,6 +9,7 @@
: ${CMAKE_ANDROID_NDK?"Android NDK path must be set"}
: ${ANDROID_API_LEVEL?"Android API level is required"}
: ${QT_ANDROID?"Path to QT root is required"}
: ${BUILD_ROOT? "Build root must be set"}
export ANDROID_ARCHITECTURE=arm
export ANDROID_ABI=armeabi-v7a
......@@ -17,9 +18,9 @@ export ANDROID_NATIVE_API_LEVEL=android-$ANDROID_API_LEVEL
cmake $KRITA_ROOT/3rdparty \
-DINSTALL_ROOT=$KRITA_ROOT/i \
-DEXTERNALS_DOWNLOAD_DIR=$KRITA_ROOT/d \
-DCMAKE_INSTALL_PREFIX=$KRITA_ROOT/i \
-DINSTALL_ROOT=$BUILD_ROOT/i \
-DEXTERNALS_DOWNLOAD_DIR=$BUILD_ROOT/d \
-DCMAKE_INSTALL_PREFIX=$BUILD_ROOT/i \
-DCMAKE_TOOLCHAIN_FILE=$CMAKE_ANDROID_NDK/build/cmake/android.toolchain.cmake \
-DANDROID_PLATFORM=$ANDROID_NATIVE_API_LEVEL \
-DANDROID_ABI=$ANDROID_ABI \
......
......@@ -7,13 +7,14 @@
: ${ANDROID_SDK_ROOT?"Android SDK path must be set"}
: ${ANDROID_API_LEVEL?"Android API level"}
: ${KRITA_ROOT?"Project root path must be set"}
: ${BUILD_ROOT? "Build root must be set"}
export ANDROID_ARCHITECTURE=arm
export ANDROID_ABI=armeabi-v7a
export ANDROID_TOOLCHAIN=arm-linux-androideabi
export ANDROID_NATIVE_API_LEVEL=android-$ANDROID_API_LEVEL
cd $KRITA_ROOT
cd $BUILD_ROOT
CURDIR="$(pwd)"/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment