CMakeLists.txt 1.23 KB
Newer Older
1 2 3 4 5
SET(PREFIX_ext_gmic "${EXTPREFIX}" )

# Download the gmic sources
ExternalProject_Add( ext_gmic_base
    DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
Boudewijn Rempt's avatar
Boudewijn Rempt committed
6 7
    URL https://gmic.eu/files/source/gmic_2.5.6.tar.gz
    URL_MD5 8deabebc29081657986ae6531e3fc1d7
8

9 10 11
    PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/cmake.diff
          COMMAND  ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/no_threads.diff

12 13
    SOURCE_DIR gmic

14 15
    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_gmic} -D -DCMAKE_BUILD_TYPE=Release ${GLOBAL_PROFILE}

16
    BUILD_COMMAND ""
17 18 19 20 21 22 23 24 25
    INSTALL_COMMAND ""

    BUILD_IN_SOURCE 1
)

# Download and build gmic-qt
# FIXME: Forcing CMAKE_BUILD_TYPE to Release
ExternalProject_Add( ext_gmic_qt
    DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
Boudewijn Rempt's avatar
Boudewijn Rempt committed
26 27
    URL https://github.com/c-koi/gmic-qt/archive/v.2.5.6.tar.gz
    URL_MD5 4e7cf71d6348d44f98d3c132433c358c
28
    PATCH_COMMAND ${PATCH_COMMAND} -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/desktop_icon.diff
29 30 31 32 33 34 35 36 37 38 39 40 41

    SOURCE_DIR gmic-qt
    INSTALL_DIR ${PREFIX_ext_gmic}

    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_gmic} -DGMIC_QT_HOST=krita -DCMAKE_BUILD_TYPE=Release ${GLOBAL_PROFILE}

    UPDATE_COMMAND ""

    DEPENDS ext_gmic_base
)

add_custom_target(ext_gmic)
add_dependencies(ext_gmic ext_gmic_qt)