Commit 2ee947c3 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Re-enable the g'mic plugin on X11

Yes, it was still the ole fixx11h.h thing... But dammit, isn't the new
way cmake finds include directories inconvenient! Having to explictily
link to QtCore and KF5::WindowSystem just to get the path to the fixx11h.h
file feels dumb to me.
parent 499d8478
......@@ -19,5 +19,5 @@ add_subdirectory( layersplit )
# Allow to skip building GMIC plugin
option(WITH_GMIC "Build the G'Mic plugin" ON)
if(WITH_GMIC)
# add_subdirectory( gmic )
add_subdirectory( gmic )
endif()
......@@ -217,6 +217,7 @@
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/keysym.h>
#include <fixx11h.h>
#include <pthread.h>
#ifdef cimg_use_xshm
#include <sys/ipc.h>
......@@ -4,7 +4,7 @@
set(GMIC_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/gmic")
include_directories(${GMIC_SOURCE_DIR})
include_directories(${KOWIDGETS_INCLUDES} ${GMIC_SOURCE_DIR})
if(NOT MSVC)
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions -fPIC")
......@@ -33,7 +33,7 @@ set(gmic_headers_SRCS
${GMIC_SOURCE_DIR}/gmic.h
)
sModelIndexConverterShowAll# Mandatory flags
# Mandatory flags
add_definitions(-Dgmic_gimp)
add_definitions(-Dgmic_build)
add_definitions(-Dgmic_float_only)
......@@ -106,7 +106,8 @@ if(FFTW3_FOUND)
endif()
if (X11_FOUND)
target_link_libraries(gmic ${X11_LIBRARIES})
target_link_libraries(gmic ${X11_LIBRARIES} KF5::WindowSystem Qt5::Core)
endif()
if(CURL_FOUND)
......@@ -183,5 +184,5 @@ DESTINATION ${GMIC_INSTALL_DIR} )
# tests, currently broken on OSX due to fftw linking problem
if(NOT APPLE)
add_subdirectory(tests)
#add_subdirectory(tests)
endif()
......@@ -25,19 +25,18 @@
#include <QLineEdit>
#include <QTextEdit>
#include <kis_gmic_settings_widget.h>
#include <kis_debug.h>
#include "kis_gmic_settings_widget.h"
#include "Parameter.h"
#include <Parameter.h>
#include <kis_debug.h>
// kritaui lib
#include <kis_slider_spin_box.h>
#include <kis_properties_configuration.h>
#include <kis_url_requester.h>
#include <KisImportExportManager.h>
//
#include "widgets/kis_url_requester.h"
#include <kis_url_requester.h>
#include <kcolorbutton.h>
#include <klocalizedstring.h>
#include <kseparator.h>
......@@ -314,7 +313,7 @@ void KisGmicSettingsWidget::createSettingsWidget(ROLE role)
if (role == CreateRole)
{
urlRequester = new KisUrlRequester;
urlRequester.setMimeTypeFilters(KisImportExportManager::mimeFilter("application/x-krita", KisImportExportManager::Import));
urlRequester->setMimeTypeFilters(KisImportExportManager::mimeFilter("application/x-krita", KisImportExportManager::Import));
urlRequester->setMode(KoFileDialog::OpenDirectory);
m_widgetToParameterIndexMapper[ urlRequester ] = i;
......
......@@ -21,6 +21,7 @@
#include <KoColorSpaceRegistry.h>
#include <kis_image.h>
#include <KoColorSpace.h>
#include <KoResourcePaths.h>
#include <KoColorModelStandardIds.h>
#include <KoColor.h>
#include <kis_surrogate_undo_adapter.h>
......@@ -88,7 +89,7 @@ void KisGmicTests::initTestCase()
KisGmicParser parser(filePaths);
m_root = parser.createFilterTree();
m_blacklistFilePath = KGlobal::mainComponent().dirs()->findResource("gmic_definitions", BLACKLIST);
m_blacklistFilePath = KoResourcePaths::findResource("gmic_definitions", BLACKLIST);
m_blacklister = new KisGmicBlacklister(m_blacklistFilePath);
m_qimage = QImage(QString(FILES_DATA_DIR)+"/"+"poster_rodents_bunnysize.jpg");
......
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