Browse Source

Update Windows build

Release_2.1
Thomas 3 months ago
parent
commit
72aaa55ef5
3 changed files with 21 additions and 10 deletions
  1. +2
    -2
      build-windows/pEpPythonAdapter.vcxproj
  2. +16
    -4
      make.mak
  3. +3
    -4
      setup.py

+ 2
- 2
build-windows/pEpPythonAdapter.vcxproj View File

@ -63,7 +63,7 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<NMakeBuildCommandLine>nmake /F "$(ProjectDir)..\make.mak" all</NMakeBuildCommandLine>
<NMakeBuildCommandLine>nmake /F "$(ProjectDir)..\make.mak" debug</NMakeBuildCommandLine>
<NMakeOutput>
</NMakeOutput>
<NMakePreprocessorDefinitions>WIN32;_DEBUG;_DLL;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
@ -76,7 +76,7 @@
<NMakePreprocessorDefinitions>_DEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<NMakeBuildCommandLine>nmake /F "$(ProjectDir)..\make.mak" all</NMakeBuildCommandLine>
<NMakeBuildCommandLine>nmake /F "$(ProjectDir)..\make.mak" release</NMakeBuildCommandLine>
<NMakeOutput>
</NMakeOutput>
<NMakePreprocessorDefinitions>WIN32;NDEBUG;_DLL;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>


+ 16
- 4
make.mak View File

@ -16,12 +16,24 @@ dist-egg: compile
# build the module into build
compile:
CD..
PY -3.8-32 setup.py build_ext
PY -3.8-32 setup.py build_ext --debug
# delete output directories
clean:
@if exist $(BUILD_DIR) rmdir /S /Q $(BUILD_DIR)
@if exist $(DIST_DIR) rmdir /S /Q $(DIST_DIR)
@if exist $(BUILD_DIR) rmdir /S /Q $(BUILD_DIR)
@if exist $(DIST_DIR) rmdir /S /Q $(DIST_DIR)
# create directories and build application
all: clean dist
all: clean dist
# release build
release: clean
CD..
PY -3.8-32 setup.py build_ext
PY -3.8-32 setup.py bdist_wheel
#debug build
debug: clean
CD..
PY -3.8-32 setup.py build_ext --debug
PY -3.8-32 setup.py bdist_wheel

+ 3
- 4
setup.py View File

@ -70,9 +70,8 @@ class BuildExtCommand(build_ext):
sys_includes = [
join(inst_prefix),
] + [d[1] for d in self.windowsGetBoostDirs()]
sys_libdirs = [
join(inst_prefix, 'Release')
] + [d[0] for d in self.windowsGetBoostDirs()]
sys_libdirs = [ join(inst_prefix, 'Debug')] if self.debug else [ join(inst_prefix, 'Release')]
sys_libdirs += [d[0] for d in self.windowsGetBoostDirs()]
libs = [
'pEpEngine',
'libpEpAdapter',
@ -82,7 +81,7 @@ class BuildExtCommand(build_ext):
compile_flags = ['/std:c++14', '/permissive']
if self.debug:
pEpLog("debug mode")
compile_flags += ['/O0', '/g', '/UNDEBUG']
compile_flags += ['/Od', '/Zi', '/DEBUG']
return (home, sys_includes, sys_libdirs, libs, compile_flags)


Loading…
Cancel
Save