CMakeLists.txt 1.38 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
SET(PREFIX_ext_sip "${EXTPREFIX}" )
if (UNIX)
    ExternalProject_Add( ext_sip
        DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
        URL http://files.kde.org/krita/build/dependencies/sip-4.18.tar.gz
        URL_MD5 78724bf2a79878201c3bc81a1d8248ea
        
        CONFIGURE_COMMAND ${PREFIX_ext_sip}/bin/python3 <SOURCE_DIR>/configure.py -b ${PREFIX_ext_sip}/bin -d ${PREFIX_ext_sip}/sip -e ${PREFIX_ext_sip}/include  --sipdir ${PREFIX_ext_sip}/sip --target-py-version 3.5
        BUILD_COMMAND make
        INSTALL_COMMAND make install
        
        BUILD_IN_SOURCE 1

Boudewijn Rempt's avatar
Boudewijn Rempt committed
14 15 16
        UPDATE_COMMAND ""
    )
elseif (MINGW)
Alvin Wong's avatar
Alvin Wong committed
17 18 19 20 21 22 23 24
    list(APPEND _SIP_conf
        --platform win32-g++
        -b ${PREFIX_ext_sip}/bin
        -d ${PREFIX_ext_sip}/share/krita/pykrita
        -e ${PREFIX_ext_sip}/include
        --sipdir ${PREFIX_ext_sip}/share/sip
        --target-py-version 3.6
    )
Boudewijn Rempt's avatar
Boudewijn Rempt committed
25 26
    ExternalProject_Add( ext_sip
        DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
Alvin Wong's avatar
Alvin Wong committed
27 28 29
        URL https://sourceforge.net/projects/pyqt/files/sip/sip-4.19.3/sip-4.19.3.zip
        URL_MD5 1098da9ee1915354fedf38fd6fbe22ce

30
        CONFIGURE_COMMAND ${PYTHON_EXECUTABLE} <SOURCE_DIR>/configure.py ${_SIP_conf}
31
        BUILD_COMMAND mingw32-make -j${SUBMAKE_JOBS} LDFLAGS=${SECURITY_SHARED_LINKER_FLAGS}
Alvin Wong's avatar
Alvin Wong committed
32
        INSTALL_COMMAND mingw32-make -j${SUBMAKE_JOBS} install
Boudewijn Rempt's avatar
Boudewijn Rempt committed
33 34 35
        
        BUILD_IN_SOURCE 1

36 37 38 39
        UPDATE_COMMAND ""
    )
endif()