summaryrefslogtreecommitdiffstats
path: root/src/widl.mk
blob: c0ef1fa06a9b55ee9ca18171849975e9531fce79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# This file is part of MXE.
# See index.html for further information.

# WIDL is called "Wine IDL Compiler"; but we use mingw-w64's copy of it to
# avoid downloading Wine's entire tree.

PKG             := widl
$(PKG)_IGNORE    = $(mingw-w64_IGNORE)
$(PKG)_VERSION   = $(mingw-w64_VERSION)
$(PKG)_CHECKSUM  = $(mingw-w64_CHECKSUM)
$(PKG)_SUBDIR    = $(mingw-w64_SUBDIR)
$(PKG)_FILE      = $(mingw-w64_FILE)
$(PKG)_URL       = $(mingw-w64_URL)
$(PKG)_DEPS     :=

define $(PKG)_UPDATE
    echo $(mingw-w64_VERSION)
endef

define $(PKG)_BUILD
    cd '$(1)/mingw-w64-tools/widl' && ./configure \
        --host='$(BUILD)' \
        --build='$(BUILD)' \
        --prefix='$(PREFIX)' \
        --target='$(TARGET)'
    $(MAKE) -C '$(1)/mingw-w64-tools/widl' -j '$(JOBS)' install

    # create cmake file
    echo 'set(CMAKE_WIDL $(PREFIX)/bin/$(TARGET)-$(PKG) CACHE PATH "widl executable")' \
    > '$(CMAKE_TOOLCHAIN_DIR)/$(PKG).cmake'
endef