CMakeLists.txt 2.32 KB
Newer Older
1
SET(PREFIX_ext_gettext "${EXTPREFIX}" )
2
if (MINGW)
3
    if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
4
        ExternalProject_Add(ext_gettext_bin
5 6
        
            DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
7 8
            URL http://files.kde.org/krita/build/dependencies/gettext0.19.8.1-iconv1.15-static-64.zip
            URL_MD5 3f8298041738b8ec1f7278d147b7cd3d
9

10 11 12 13 14 15 16
            BUILD_COMMAND ${CMAKE_COMMAND} -E echo Deploying gettext 64-bit dependencies
            CONFIGURE_COMMAND ""
            INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR> ${PREFIX_ext_gettext}
                    
            UPDATE_COMMAND ""
        )
    else("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
17
            ExternalProject_Add(ext_gettext_bin
18 19
        
            DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
20 21
            URL http://files.kde.org/krita/build/dependencies/gettext0.19.8.1-iconv1.15-static-32.zip
            URL_MD5 970afaea0d433a73a996d709d5c22f6d
Dmitry Kazakov's avatar
Dmitry Kazakov committed
22

23 24 25 26 27 28 29
            BUILD_COMMAND ${CMAKE_COMMAND} -E echo Deploying gettext 64-bit dependencies
            CONFIGURE_COMMAND ""
            INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory <SOURCE_DIR> ${PREFIX_ext_gettext}

            UPDATE_COMMAND ""
    )
    endif()
30 31 32
    ExternalProject_Add (
        ext_gettext_lib
        DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
Boudewijn Rempt's avatar
Boudewijn Rempt committed
33
        URL https://ftp.gnu.org/gnu/gettext/gettext-0.18.tar.gz
34 35 36 37 38 39
        URL_MD5 d52a3e061032a1ed13856d42fc86f0fd
        PATCH_COMMAND ${PATCH_COMMAND} --binary -p1 -i ${CMAKE_CURRENT_SOURCE_DIR}/gettext-0.18-20130319.diff
        INSTALL_DIR ${PREFIX_ext_gettext}
        CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${PREFIX_ext_gettext} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE}
        UPDATE_COMMAND ""
        DEPENDS ext_patch ext_iconv
40 41 42
    )
    add_custom_target(ext_gettext)
    add_dependencies(ext_gettext ext_gettext_bin ext_gettext_lib)
43
else (MINGW)
Dmitry Kazakov's avatar
Dmitry Kazakov committed
44
ExternalProject_Add( ext_gettext
Boudewijn Rempt's avatar
Boudewijn Rempt committed
45 46 47 48 49 50 51 52
    DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
   URL http://files.kde.org/krita/build/dependencies/gettext-0.19.8.tar.gz
   URL_MD5 e4fffc004f21596becd1055cf36be31d
    
    INSTALL_DIR ${PREFIX_ext_gettext}
    CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${PREFIX_ext_gettext} --disable-java   ${GLOBAL_AUTOMAKE_PROFILE} --disable-native-java 
   BUILD_COMMAND make
   INSTALL_COMMAND make install
53

Boudewijn Rempt's avatar
Boudewijn Rempt committed
54 55
    UPDATE_COMMAND ""
    DEPENDS ext_iconv
Dmitry Kazakov's avatar
Dmitry Kazakov committed
56
)
57
endif (MINGW)