From 0cefcac6d50e8d8cc63e7a792ad2f7ae295f9fd9 Mon Sep 17 00:00:00 2001
From: Nicolas Pope <nwpope@utu.fi>
Date: Thu, 4 Jun 2020 10:44:49 +0300
Subject: [PATCH] Fix for windows unit tests

---
 components/codecs/test/CMakeLists.txt | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/components/codecs/test/CMakeLists.txt b/components/codecs/test/CMakeLists.txt
index 65d5bfaee..9646e2c3f 100644
--- a/components/codecs/test/CMakeLists.txt
+++ b/components/codecs/test/CMakeLists.txt
@@ -26,6 +26,13 @@ $<TARGET_OBJECTS:CatchTest>
 	../src/depth_convert.cu
 	./nvpipe_codec_unit.cpp
 )
+if (WIN32)
+	if (CMAKE_SIZEOF_VOID_P EQUAL 8)
+		target_link_directories(nvpipe_codec_unit PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../src/Video_Codec_SDK_9.1.23/Lib/x64)
+	elseif (CMAKE_SIZEOF_VOID_P EQUAL 4)
+		target_link_directories(nvpipe_codec_unit PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../src/Video_Codec_SDK_9.1.23/Lib/Win32)
+	endif()
+endif()
 target_include_directories(nvpipe_codec_unit PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../include"
 ${CMAKE_CURRENT_SOURCE_DIR}/../src/Video_Codec_SDK_9.1.23/include
 ${CMAKE_CURRENT_SOURCE_DIR}/../src/Video_Codec_SDK_9.1.23/Samples/NvCodec)
-- 
GitLab