Skip to content

Commit

Permalink
EASTL build: tell CMake about our ressource compiler windres
Browse files Browse the repository at this point in the history
Signed-off-by: Toni Uhlig <[email protected]>
  • Loading branch information
utoni committed Aug 29, 2022
1 parent 483456e commit 5b01d3f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@ jobs:
WERROR=1 JOBS=4 Q= \
CC=/usr/bin/x86_64-w64-mingw32-gcc \
CXX=/usr/bin/x86_64-w64-mingw32-g++ \
RC=/usr/bin/x86_64-w64-mingw32-windres \
DDK_INCLUDE_DIR=/usr/x86_64-w64-mingw32/include/ddk
- run: |
env DEBIAN_FRONTEND=noninteractive \
make install \
WERROR=1 Q= \
CC=/usr/bin/x86_64-w64-mingw32-gcc \
CXX=/usr/bin/x86_64-w64-mingw32-g++ \
RC=/usr/bin/x86_64-w64-mingw32-windres \
DDK_INCLUDE_DIR=/usr/x86_64-w64-mingw32/include/ddk \
DESTDIR=_install/
1 change: 1 addition & 0 deletions Makefile.deps
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ $(EASTL_STATIC_LIB): $(CXX) $(EASTL_DEPS)
cd $(EASTL_BUILDDIR) && \
$(CMAKE) ../EASTL \
-DCMAKE_CXX_COMPILER="$(realpath $(CXX))" \
-DCMAKE_RC_COMPILER="$(realpath $(RC))" \
-DCMAKE_SYSTEM_NAME="Windows" \
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
-DCMAKE_CXX_FLAGS='$(CFLAGS) $(CXXFLAGS) $(EASTL_CXXFLAGS)' && \
Expand Down
6 changes: 5 additions & 1 deletion Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,17 @@ LOCAL_MINGW64_BUILD_SCRIPT := $(DPP_ROOT)/mingw-w64-build/mingw-w64-build
LOCAL_MINGW64_BUILD_DIR := $(DPP_ROOT)/w64-mingw32-sysroot/x86_64
LOCAL_MINGW64_CC := $(LOCAL_MINGW64_BUILD_DIR)/bin/x86_64-w64-mingw32-gcc
LOCAL_MINGW64_CXX := $(LOCAL_MINGW64_BUILD_DIR)/bin/x86_64-w64-mingw32-g++
LOCAL_MINGW64_RC := $(LOCAL_MINGW64_BUILD_DIR)/bin/x86_64-w64-mingw32-windres
SIGNTOOL := osslsigncode
SIGNTOOL_PREFIX := codesign

DDK_GLOBAL_DEPS := deps $(LOCAL_MINGW64_BUILD_SCRIPT) $(LOCAL_MINGW64_BUILD_DIR) $(LOCAL_MINGW64_CC) $(LOCAL_MINGW64_CXX)
DDK_GLOBAL_DEPS := deps $(LOCAL_MINGW64_BUILD_SCRIPT) $(LOCAL_MINGW64_BUILD_DIR) $(LOCAL_MINGW64_CC) $(LOCAL_MINGW64_CXX) $(LOCAL_MINGW64_RC)

INSTALL = install
CMAKE = cmake
CC = $(LOCAL_MINGW64_CC)
CXX = $(LOCAL_MINGW64_CXX)
RC = $(LOCAL_MINGW64_RC)
DDK_INCLUDE_DIR = $(dir $(CC))../x86_64-w64-mingw32/include/ddk
CFLAGS := -Wall -Wextra -Wno-sign-compare -Wno-strict-aliasing \
-m64 -fPIC -fvisibility=hidden \
Expand Down Expand Up @@ -88,6 +90,7 @@ path_exists = \
define CHECK_REQUIRED_PATHS
$(call path_exists,$(CC))
$(call path_exists,$(CXX))
$(call path_exists,$(RC))
$(call path_exists,$(DDK_INCLUDE_DIR))
$(call path_exists,$(DRIVER_ADDITIONAL_OBJS))
$(call path_exists,$(EASTL_STATIC_LIB))
Expand Down Expand Up @@ -208,6 +211,7 @@ define HELP_MAKE_OPTIONS
@echo -e '\tBUILD_NATIVE = no'
@echo -e '\tCC = $(CC)'
@echo -e '\tCXX = $(CXX)'
@echo -e '\tRC = $(RC)'
@echo -e '\tDDK_INCLUDE_DIR = $(DDK_INCLUDE_DIR)'
@echo -e '\tDPP_ROOT = $(DPP_ROOT)'
endef

0 comments on commit 5b01d3f

Please sign in to comment.