summaryrefslogtreecommitdiffhomepage
path: root/tracker-rs
diff options
context:
space:
mode:
Diffstat (limited to 'tracker-rs')
-rw-r--r--tracker-rs/CMakeLists.txt9
-rw-r--r--tracker-rs/rs_impl/bin/.gitignore1
-rw-r--r--tracker-rs/rs_impl/build.bat9
-rw-r--r--tracker-rs/rs_impl/build_amd64.bat4
-rw-r--r--tracker-rs/rs_impl/build_wrapped.bat10
-rw-r--r--tracker-rs/rs_impl/build_x86.bat4
6 files changed, 28 insertions, 9 deletions
diff --git a/tracker-rs/CMakeLists.txt b/tracker-rs/CMakeLists.txt
index e81dc5ae..b624bdfc 100644
--- a/tracker-rs/CMakeLists.txt
+++ b/tracker-rs/CMakeLists.txt
@@ -1,7 +1,12 @@
if(WIN32)
opentrack_boilerplate(opentrack-tracker-rs)
- target_link_libraries(opentrack-tracker-rs "${CMAKE_SOURCE_DIR}/tracker-rs/rs_impl/bin/opentrack-tracker-rs-impl.lib")
- install(FILES "${CMAKE_SOURCE_DIR}/tracker-rs/rs_impl/bin/opentrack-tracker-rs-impl.dll" DESTINATION . ${opentrack-perms})
+ if(opentrack-64bit)
+ set(suffix _amd64)
+ else()
+ set(suffix "")
+ endif()
+ target_link_libraries(opentrack-tracker-rs "${CMAKE_SOURCE_DIR}/tracker-rs/rs_impl/bin/opentrack-tracker-rs-impl${suffix}.lib")
+ install(FILES "${CMAKE_SOURCE_DIR}/tracker-rs/rs_impl/bin/opentrack-tracker-rs-impl${suffix}.dll" DESTINATION . ${opentrack-perms})
install(FILES "${CMAKE_SOURCE_DIR}/tracker-rs/redist/intel_rs_sdk_runtime_websetup_10.0.26.0396.exe" DESTINATION ./contrib/ ${opentrack-perms})
install(FILES "${CMAKE_SOURCE_DIR}/tracker-rs/redist/RS_EULA.rtf" DESTINATION ./contrib/ ${opentrack-perms})
endif()
diff --git a/tracker-rs/rs_impl/bin/.gitignore b/tracker-rs/rs_impl/bin/.gitignore
new file mode 100644
index 00000000..e94bb21f
--- /dev/null
+++ b/tracker-rs/rs_impl/bin/.gitignore
@@ -0,0 +1 @@
+/*.exp
diff --git a/tracker-rs/rs_impl/build.bat b/tracker-rs/rs_impl/build.bat
index 89b7647e..5b6ae279 100644
--- a/tracker-rs/rs_impl/build.bat
+++ b/tracker-rs/rs_impl/build.bat
@@ -1,7 +1,2 @@
-IF DEFINED %VS120COMNTOOLS%] (
- chdir /d "%VS120COMNTOOLS%\..\..\VC"
- ) ELSE (
- chdir /d "%VS140COMNTOOLS%\..\..\VC"
- )
-
-vcvarsall x86 && chdir /d %~dp0 && CL /nologo /Ox /DUNICODE /D_UNICODE /DEXPORT_RS_IMPL /MT /I"%RSSDK_DIR%\opensource\include" ftnoir_tracker_rs_impl.cpp "%RSSDK_DIR%\opensource\src\libpxc\libpxc.cpp" /link ADVAPI32.LIB /DLL /OUT:bin\opentrack-tracker-rs-impl.dll \ No newline at end of file
+@cmd /c .\build_wrapped.bat
+@pause \ No newline at end of file
diff --git a/tracker-rs/rs_impl/build_amd64.bat b/tracker-rs/rs_impl/build_amd64.bat
new file mode 100644
index 00000000..34553fd8
--- /dev/null
+++ b/tracker-rs/rs_impl/build_amd64.bat
@@ -0,0 +1,4 @@
+@set path=%vs_dir%;%path%
+call vcvarsall %vs_64%
+@if %errorlevel% neq 0 exit 1
+CL /nologo /Ox /DUNICODE /D_UNICODE /DEXPORT_RS_IMPL /MT /I "%RSSDK_DIR%\opensource\include" ftnoir_tracker_rs_impl.cpp "%RSSDK_DIR%\opensource\src\libpxc\libpxc.cpp" /link ADVAPI32.LIB /DLL /OUT:bin\opentrack-tracker-rs-impl_amd64.dll \ No newline at end of file
diff --git a/tracker-rs/rs_impl/build_wrapped.bat b/tracker-rs/rs_impl/build_wrapped.bat
new file mode 100644
index 00000000..e3679321
--- /dev/null
+++ b/tracker-rs/rs_impl/build_wrapped.bat
@@ -0,0 +1,10 @@
+@IF DEFINED VS150COMNTOOLS (
+ set vs_dir="%VS150COMNTOOLS%\..\..\VC"
+ set vs_64=x86_amd64
+ ) ELSE (
+ set vs_dir="%VS140COMNTOOLS%\..\..\VC"
+ set vs_64=amd64
+ )
+
+cmd /c .\build_x86.bat
+cmd /c .\build_amd64.bat \ No newline at end of file
diff --git a/tracker-rs/rs_impl/build_x86.bat b/tracker-rs/rs_impl/build_x86.bat
new file mode 100644
index 00000000..289e2e2f
--- /dev/null
+++ b/tracker-rs/rs_impl/build_x86.bat
@@ -0,0 +1,4 @@
+@set path=%vs_dir%;%path%
+call vcvarsall x86
+@if %errorlevel% neq 0 exit 1
+CL /nologo /Ox /DUNICODE /D_UNICODE /DEXPORT_RS_IMPL /MT /I "%RSSDK_DIR%\opensource\include" ftnoir_tracker_rs_impl.cpp "%RSSDK_DIR%\opensource\src\libpxc\libpxc.cpp" /link ADVAPI32.LIB /DLL /OUT:bin\opentrack-tracker-rs-impl.dll \ No newline at end of file